Category Archives: windows

ASP.NET MVC in windows XP

Running ASP.NET MVC application software in Windows XP and Windows Server 2003

ASP.NET MVC applications may show up error 404 not found or 403 Forbidden or Directory Listing Denied when we have a problem with configuration in ISAPI mappings.

When we install ASP.NET MVC it will set up an ISAPI mapping in IIS 6 to map the .mvc extension to the aspnet_isapi.dll. This is done in order for IIS to hand off requests using the .mvc file extension to ASP.NET.

Trouble shooting steps :

1. Make sure proper version of MVC and ASP.NET is installed. Check the version of MVC and ASP.NET from add remove programs.

2. Run inetmgr and check  version of ASP.NET for your site by right clicking the site.

Check ASP.net version

Look at the properties for website and ensured that Scripts are enabled.

3. Map .mvc to ASP.NET

3.1. If you are using .mvc as file extensions.You have to map from virtual Directory tab by right clicking the properties of the site and click configuration and then click Add tab
In Executable add the path of .NET aspnet_isapi.dll c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

or

c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll
(This may be different location if your installation is different.)

At Extension add .mvc

In verbs click limit to radio button and add GET,POST,HEAD,DEBUG

Make sure to uncheck Check the file exists.

3.2. If you are using extension less URL then repeat the above step but at At Extension add .*
If you are using server 2003 than you can add a wild card Mapping as suggested here :


At the
Application Configuration Properties dialog like we did when configuring the .mvc ISAPI mapping and Next to the Wildcard application maps, click Insert.. button.

 

Make sure to uncheck Verify that file exits.

4. Make sure that ASP.NET is enabled

Change MAC Address Loopback Adapter

My Blog is receiving a lot of search query for the change loopback adapter mac address. Previously, I have written article on spoofing mac address using Loopback Adapter . You may refer to the same blog post if you need to install Loopback Adaptor.In this blog I am writing how to change MAC address of Loopback adapter in this blog.STEPS:1. Goto Device Manager  from Control panel or Using devmgmt.msc from RUN

2. Expand Network Adapter and right click properties.

Device Manager Loopback Adaptor Properties
3. Click Advanced Tab and Click Network Address add MAC address in the format as in the Screen Shot below.

Loopback adaptor MAC address

4. You can conform the change of mac Address using ipconfig /all from Command and check Hardware Address.

Asp.Net Development Server Remote Access

ASP.NET Development  server is used by visual studio as a Default Webserver this server is only available in localhost interface. Asp.net development server remote access can be enabled as discussed below.After this is enabled this can be accessed from LAN and WAN

1. Install Web Farm Network, Application Request Routing and URL Rewriter tools either by using Web Platform installer or direct downloads using the link below:
2. Open IIS Manager from cmd by typing inetmgr

3. Create a new website by right clicking your DOMAINPC NAME

4. Create new website in say port port 82 (in most case you may have used port 80)
5.Double Click the site you have created and select Reverse proxy.

6.Check the port of your Development server by debugging your code at visual studio and in my case it is 2529 In reverse proxy window add localhost:2529 as Inbound rule.

7. Now your LAN users can access your development server as http://:82 or port no as you have setup in step 4.For WAN you can NAT (port forward ) your desired port to your PC IP.

Pending restart SQL server installation

If you  have tried to install SQL Server 2008  and cannot install, because of  the errormessage the prerequistite “Restart the computer is required”.

But every time you restart  computer and try to execute the setup of SQL Server 2008, you get the same message

Then you have change a registry entry in computer

  • Open Regedit
  • Find the key “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager”
  • Rename the “PendingFileRenameOperations” value to “PendingFileRenameOperations2″
  • Try again

This will solve the Restart Problem

Change UUID of Vdi in Virtualbox

Making  copy of the .vdi file into another location will make a real copy of the virtual disk, including the UUID of the disk. If this disk is added to  the Virtual Media Manager, you  will get an error like this:

virtualbox-error.png

To chage the UUID of disk use following command

$ VBoxManage internalcommands setvdiuuid /path/to/virtualdisk.vdi
VirtualBox Command Line Management Interface Version 2.2.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: 9e89fe14-d010-469e-a737-cd6521889acb

Since the old UUID is change , you can now add this virtual disk to Disk Manager

You need not use this commmad if you use clonevdi function to duplicate the virtual disk image, in the first place. The clonevdi  makes the new disk image with unique UUID.

The syntax of the clonedvi goes like this:

$ VBoxManage clonevdi_Master.vdi Clone.vdi