Hi agaurav,
Since the project works well in build-in ASP.NET Development Server, the issue is mostly permission issue. When running under ASP.NET Development Server, the account is local system. When running under IIS, by default the account is ASPNET (IIS 5) or Network Service (IIS 6). The are the less-privileged accounts.
To fix this issue, please try to change the running account to local system account which the build-in ASP.NET Development Server using. To do so, please refer the following:
For IIS 5.0:
Modify the machine.config with userName to ?System? and the password to ?AutoGenerate?. For the detailed information, please refer to the following link:
ASP.NET Process Identity
http://msdn2.microsoft.com/en-us/library/aa291339(VS.71).aspx
For IIS 6.0:
1. In the IIS Manager, expand local computer, expand Application Pools, right-click the application pool that you want to configure (by default it is DefaultAppPool), and then click Properties.
2. Click the Identity tab.
3. Click Predefined, and in the list box next to it, click Local System.
4. Click OK.
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.