Teucer's Quiver
Me && .net

How does vs.net know that the asp.net project is of which version...

Wednesday, January 21, 2004 2:40 AM
Ever wondered how vs.net 2003 is able to find out when you open a project whether or not your IIS configuration supports v1.1 of asp.net

Well this is how. when you open a project in vs.net it starts talking to the web server and sets up your vswebcache folder which is otherwise used for your offline development in case the dev IIS server is not localhost

It actually calls a magic file "Get_aspx_ver.aspx" from the web server. It does not matter whether your application has this file or not. But it does matter that IIS returns something for this HttpRequest made by vs.net :)

Now the HttpHeaders would contains apart from other information the information of the .Net framework which is installed on the web server. Now need I explain more ..
I noticed this issue by accident. As I completed porting our application from v1.0 to v1.1 and prepared / upgraded the solution and project files in vs.net 2003 (which by default supports v1.1 of fx) and started looking at the event log (our existing app logs to the event log for what ever error the asp.net app might encounter) and I saw these errors and got suprised (the app I was migrating happens to be something in which I dont have absolute knowledge relating to what all files are present in it) and hence started wondering if I misplaced any file. On more analysis and trying to repro this issue I noticed that when ever I opened the solution + web project it was logging these errors.

The next step was to open the IIS logs to find out who is calling this page in question and ofcourse the Request headers contained the info I needed (vs.net). Now satisfied that I found the culprit the next job was to find out how to eliminate this issue cos I didnt want all our dev team members to simply find this error in the event log for simply opening and closing the solution + web project.

This post by Thomas Baker helped me to resolve the issue.

Interresting inst ;)

Feedback

# re: How does vs.net know that the asp.net project is of which version...

Blogging in early hours or latenights? 1/22/2004 10:38 PM | Sudhakar

# re: How does vs.net know that the asp.net project is of which version...

hahhahhaa, think of it as work without the elements of time and space (as in the hitchhikers guide to the galaxy) :p

1/23/2004 5:55 AM | Teucer

# re: How does vs.net know that the asp.net project is of which version...

I found out about this mysterious aspx when I added some code in the global.asa Application_Error event to send me an email whenever users get errors but now getting an email for whenever I open my project because it could not find Get_aspx_ver.aspx 4/15/2004 11:50 AM | sok

# re: How does vs.net know that the asp.net project is of which version...

An update just a few days back I found that if you change your default inetpub folders or clean it up removing any of the files which you believe are unncessary then also this file goes out of the radar (I mean the file could not be accessed) then also vs.net would spit at you ! 4/16/2004 12:39 AM | Teucer

# Hello Here!

Hey!
New here and first post.
I am woman, 28 years old from Portugal
I enjoyed here.

Botijos 10/29/2009 8:41 AM | Beeniashems

Post a comment