Friday, February 17, 2006

Haunted Mansion : ASP.NET and SQL Server Express

If there is no other technology as good as the .net platform, then there is no other technology with as many vague-properly undocumented issues as the Asp.net platform. There are several server side issues both during development and deployment. Long ago, when i first started asp.net programming it was hell for me, to set up IIS working because even if you have a single virus active ASP.NET applications refused to run. And more over with Visual Studio 2003, unless IIS is working properly you cannot imagine programming Asp.net applications.

With .NET 2.0 and Visual Studio 2005, i thought the issues are all over, i guess i saw somewhere that you dont need IIS to develop Web Applications(ofcourse to run and test them you do need IIS) Then i thought i could give IIS, a finger - because it has really irritated me so much. As it is I hate web programming and with IIS, my hatred grew. But future is all about ASP.NET and Web Services, even if you arent in love with them, you have to marry both.

Real nuisance i would say are the Xml configuration files. I agree they are really nice feature, but i would say from developer perspective they are nuisance. When Microsoft lovers are more inclined towards GUI way of programming, with Visual Tools workin with stupid XML files is really painful. You talk about security, you see web.config or machine.config; that is really stupid. There is a reason for me to get irritated so much. Recently I was working on C#-Vb.NET conversion project. It involves SQL Server Express 2005. Yeah fine, i had it installed and wanted to test it with asp.net application. But the connection refuses to open when running the program it says:
Login failed for the account Archsoft\ASPNEt
(Archsoft is my machine name)
I have been banging my head since two days, trying to figure out what is to be done. But nah!!, i dont get any feasible solution.

I thought of installing the SQL Server Express Management Studio, which is ofcourse free(30mb download, i wonder why it isnt included with SQL Server Express) But my drive where sql server epxress is installed is only 4000mb of size and i am left with only 30mb of free space.(it needs 191 mb of free space)

Now i googled out for one last time, before i give up and found this link.
http://forums.asp.net/1176822/ShowPost.aspx

Anyway the worst part of this is that, the issues are very new compared to what we had in .NET 1.1(they were age old with quite a few solutions online) . And you know what !!! Check out MSDN support's answer for that issue, here :
http://support.microsoft.com/default.aspx?scid=kb;en-us;316989
It says


To resolve this issue, use one of the following methods:
Method 1. Programmatically change the security context of the ASP.NET worker process to a user who has the correct SQL Server permissions.
Method 2. Change the default configuration of ASP.NET so that the ASP.NET worker process starts and runs under the context of a user who has the correct permissions in SQL Server.
Method 3. Grant the correct permissions on SQL Server so that the aspnet_wp account (or NetworkService account, for an application that runs on IIS 6.0) has the appropriate access to the required resources.



Come on!! The exception i get during developmet clearly says
Login failed for user 'MachineName\ASPNET
Any dumbass with common sense knows that the account ASPNET doesnt have sufficient privileges. So one expects the support article to answer "how to set aspnet the required privileges?" But as you can notice above they gave 3 methods on how to resolve this problem and all are statements !! Is that any kind of support??? Well if it is then i m a dumbass then.

Very soon i shall figure out the solution and i shall provide the support what the article doesnt. Till then join me and abuse that article :))

See you soon with solution.

No comments: