Wednesday, September 7, 2011

Visual Studio Crashing

I was working on a Web application few months ago and visual studio started crashing. Initially, I thought it’s my notebook problem. I had restarted the machine twice, but visual studio kept on crashing. I was a bit shock to see this.

After doing some RND, I came to know that my studio setting corrupted. I had reset my studio settings by using following steps.


1. Go To Tools -> Options
2. Click on Import and Export Settings and you will see a wizard.
3. On Import and Export Settings Wizard. Select Reset all settings option.
4. On next step, select save current settings.
5. On final step, click on Finish button.

After following these steps restart studio, your visual studio started running normally.


Tuesday, September 6, 2011

Remote Debugging in Asp.net

Sometime we need to debug on client machine, in order to do it in a better way we have remote debugging option available. We can do remote debugging by following some simple steps listed below:

1. Run the Visual Studio Remote Debugging monitor tool on server machine i.e msvsmon.exe. It is present at C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86. The Remote Debugging tool (Msvsmon.exe) is a small windows based application that Visual Studio uses for remote debugging. After launching this you will see the following screen:


remote8.jpg

Configure Authentication Mode

Configuration of msvsmon tool is very easy. The main configuration is involves with the authentication mode. Msvsmon support two types of authentication

  • Windows Authentication
  • No-Authentication
Windows authentication is a secure mode, in which u can enable specific set of users to connect to remote debugging server,
There is no security involved with no-authentication mode. Any one can debug remotely, if the authentication mode is set to "No-Authentication". As this debugging mode is not at all secure, so it should be used only on secure network.

2. Install the Remote debugger on server. Lets assume we have a visual studio 2010 application deployed on server, in that case, we will install Visual Studio 2010 Debugger i.e. Available Here

3. Attache Process from client machine i.e your local machine by going through Tools->Attach Process and link with the remote debugger process (w3wp.exe). If you have more than one application pool, you can figure out your application pool by using following command:

cscript iisapp.vbs (IIS 6)


for IIS-7 , use the following command
appcmd list wps (C:\Windows\system32\inetsrv\)

Happy Remote Debugging......... :)

Monday, September 5, 2011

Remove Dual Boot Option in Windows 7

Hi everyone, I wanted to share this little tip which you may find useful if you have been using dual boot on a machine and for some reason you want to remove any option. Follow the step below for achieving this.
- Start Run in start menu and type in “msconfig” in the “Open” text box.


- System configuration window will be opened in front of you. Click the Boot tab.



- You will see the list of more than one option in the list if you are using dual boot. Simpleright click the option you no longer want click delete from the menu.
- Click Apply and then OK, system will ask for a restart which you can do with your own convenience.
By following these steps you can remove dual boot option.
For

Silverlight 4 Synchronous WCF Service Calls (or “How to avoid writing a 1-tier Silverlight App”

Silverlight is great. Silverlight 4 is extra great. If you know a little bit about WPF and a handful about the ViewModel Pattern, you’re in great shape. If you’re like me, you tend to mock up your user interfaces and user interface functionality using only client-side functionality before you start to make calls back to the server-side WCF services for save/update/load operations. This mocking strategy is great for iterating with your customer (thinking Scrum/Agile) and allows you to get a “working” user interface before you commit to implementing all the back-end business functionality.

Well, if this is your first Silverlight application, there’s a catch. Yah. A big ol’ catch. As you work from the UI back toward the service, you’re eventually going to need to start making calls to those WCF services from Silverlight. All those calls are asynchronous. It’s not optional either – they really have to be. If you don’t make those calls asynchronously, the Silverlight UI locks up like a…uhhmmm…like a…uhmmm…it locks up like a blogger trying to come up with a clever simile for a completely broken and completely hung Silverlight user interface.

So, think about the structure of an Async call in .NET: you make a call to an async method and you provide that async call with a delegate to call when it’s done. Essentially, you tell the async method to call you back when it’s done. That call you make to the async method is non-blocking and returns immediately. Essentially the async method is saying “I’ll be back later. Don’t wait up.”


Access to path \\remotewinXP\folder\ is denied

Based on my test, you could choose either of these two ways. The recommended one is to use a domain user. As mentioned above, you could use impersonation programmatically. The second one is also suitable if you're not familiar with impersonation. I tested it and everything works well. Here're the steps:

  • Step 1. Create a system user e.g. ForASPNET on the machine which hosts the ASP.NET application.
  • Step 2. Grant the same permissions like ASP.NET built-in account Network Service. You could start the Visual Studio Command Prompt and run this command "aspnet_regiis -ga ForASPNET".
  • Step 3. Create a system user in the shared server with the SAME name and password.
  • Step 4. Grant the permissions to the shared file to the user ForASPNET.
  • Step 5. Set the Identity as ForASPNET in the ApplicationPool which the ASP.NET application is running under.

After these steps, you could resolve the problem.

Thanks.

Earn Money ! Affiliate Program
Open Directory Project at dmoz.org