Monday, October 13, 2008

Add Windows Explorer to your Visual Studio tools menu

So glad that there is a solution to this else it takes so many clicks to get there.

Quote:

To set it up, click Tools, then External Tools..., then click Add. Now enter the following data:
Title: Windows Explorer
Command: explorer.exe
Arguments: /select,"$(ItemPath)"

Leave Initial directoy blank, and click OK. Now when you click Tools, Windows Explorer, Windows Explorer will open with the current file you are editing selected.



Link: http://dotnettipoftheday.org/tips/explorer-in-tools-menu.aspx


Looking for the perfect gift? Give the gift of Flickr!

Friday, October 3, 2008

Site: .Net tip of the Day

Adding user to Team Web Access 2005

Problem:

Add user to team web access for TFS

 

Solution:

When you add a user from visual studio Team menu option to be able to access TFS projects, it doesn’t give permissions on team web access in sharepoint. In order to do that, there is a windows group on tfs server machine called TWSA, if you add the user in this group, user gets access to sharepoint tfs site.

Monday, September 15, 2008

Response.End and download file problem using asp.net code inside sharepoint

Issue:

To download file from Sharepoint doesn’t work but works fine in plain asp.net environment.

Solution:

Solution is very simple, Add the following code for the button or link which initiates the download:

MyButton.OnClientClick = "document.getElementById(""" & Me.Page.Form.ClientID & """).onsubmit = function() {return true;}"

Link: http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment/thread/107b2c17-07fe-4a15-ad81-dcb31e1e9c84

Friday, September 12, 2008

Impersonating in Windows (WinForm)

Impersonating in asp.net is as simple as just adding a tag in web.config but in windows I found few links which were using kernel dll to impersonate. Article I found on theserverside.net shows new features in .net 2.0 which makes it very easy to do this.

Quote:

System.Diagnostics.ProcessStartInfo pInfo =   new System.Diagnostics.ProcessStartInfo();
            SecureString ss = new SecureString();
                          ... append password characters
            pInfo.Password = ss;
            pInfo.UserName = @"domain\alice";
            pInfo.FileName = @"c:\windows\notepad.exe";
            pInfo.UseShellExecute = false;
            Process.Start(pInfo);

Link: http://www.theserverside.net/tt/articles/showarticle.tss?id=NewSecurityFeatures