Tips, Tricks, and Fixes for when your computer doesn't do what it's told.

Thursday, September 1, 2011

VS2005 Debug Breakpoints Not Working in Javascript

If using Visual Studio 2005 and Internet Explorer 8, debugging breakpoints may not work for javascript. However it will work if the Attach to Process function (to internet explorer) is used, it will work. However this would need to be done for each debug session

This can be fixed by:

1) Open RegEdit
2) Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
3) Add a dword under this key called TabProcGrowth
4) Set TabProcGrowth to 0

More information can be found at this thread:
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e2c795cd-b7a0-4fad-b7c9-b1ca40d7302e/

Tuesday, August 2, 2011

Report Access to ASP.NET Development Port

Since it's not always possible to install all browsers on a development system for testing web applications durng debugging, the port can be redirected so that the application can be launched in debug mode and then accessed from a different computer.

Download the Soap Toolkit 3.0 from here:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13456
and install the trace utility.

Run the Trace Utility and select FileNewFormatted Trace. Change the destination port to the port defined by ASP.NET. Run the application, and from the other browser, use the url like "http://111.22.33.44:8080/Home.aspx/Index"


More detail can be found at: http://www.pluralsight-training.net/community/blogs/jimw/archive/2009/09/03/accessing-the-visual-studio-asp-net-development-server-from-iphone.aspx

Tuesday, June 14, 2011

Web.config encryption

To encrypt the connection string section of a web config file:

1. Open a command prompt and cd to:
c:\Windows\Microsoft.NET\Framework\v2.0.*
2. Type the command:
aspnet_regiis -pe "connectionStrings" -app "/sitename" -prov DataProtectionConfigurationProvider

Note: The provider parameter is needed otherwise the app cannot read the encrypted section and will return the error "The RSA key container could not be opened"

More information: http://msdn.microsoft.com/en-us/library/ms998280.aspx

Monday, June 13, 2011

Visual Studio crashes creating entity data model

One way around this is:

1) Open the "Visual Studio 2008 Command Prompt" (with administrator privileges if Vista)
2) devenv /resetskippkgs
3) Close Visual Studio
4) devenv /setup
5) Run Visual Studio

Found in: http://forums.asp.net/p/1414299/3114264.aspx

Saturday, January 29, 2011

Report Control Formatting in Firefox

When displayed on a Safari or Firefox, the ASP.NET ReportControl renders incorectly - like a small box in the corner. This can be fixed by setting the style in the control:


Style="display: table; margin: 0px; overflow: auto;" runat="server"

This suggestion can be found in the forum post:
http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/d5157c21-f271-4f17-bac4-3e27dbc9e0cf

Thursday, January 20, 2011

JQuery Intellisense not working in VS2008

For intellisense to work in Visual Studio for JQuery, the following is required:

1. Visual Studio SP1 applied
2. jquery-1.2.6-vsdoc.js file downloaded from jquery and put in scripts folder for the project
3. The master page must reference jquery files like this:



Note: The ~ in front is important.

Links:
http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx
http://blog.bvsoftware.com/post/2008/11/06/JQuery-Intellisense-in-Visual-Studio-2008-Tip-if-its-not-working-in-MVC.aspx

Tuesday, January 18, 2011

Add/Delete certificates for local system account

For services applications that are running under the local system account, certificates can be added for that account by running a snap-in for the MMC. When a certificate is added to the registery for the local system, it can then be reached by the service for authentication.

-- Select StartRun and enter mmc.
-- In the console, select FileAdd/Remove Snap-in
-- Select Add, then select Certificates and click Add
-- To manage certificates, select the option Computer Account and click Next
-- Select Local computer and click Finish
-- Click Close, then Okay
-- Expand the tree for Certificates/Trusted root/Certificates
-- The trusted root certificates (accessed as "ROOT" in code) can be managed from here

More information can be found at:
http://technet.microsoft.com/en-us/library/bb680501.aspx

VS 2008 MVC "Project Type not supported"

When trying to open some sample MVC .csproj or vb.proj project files, the error returned "The project file "\\home\username\Data\Visual Studio 2008...Commerce.MVC.Web.csproj" cannot be opened. The project type is not supported by this installation."


This can be fixed by editing the project file for the element . The guid should be changed to "{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}"


More information can be found here: