A little background
I installed the VS 2005 Web Application Project V1.0 Release (installation was successfull) and followed Scott Guthrie's tutorial to the letter (below)
However, I am getting the following error in My First Web Application Project: "Object reference not set to an instance of an object." This happens as soon as I hit the F5 key (or CTRL+F5 key).
I have checked all the references and they all seem to be OK.
I double checked myproject's properties and they match the screenshots from the tutorial.
I added the ASPNET and NETWORK SERVICE users with Full Permissions to the physical path for my project (D:\MyDNNProjects\ ). This didn't work either.
I also tried to un-install and re-install the Web Application Project V1.0 Release but the problem still persists.
Note: The solution builds correctly and the assembly is created in the /bin directory (MyDnnProjects.dll)
I re-installed Visual Studio 2005 Team System thinking I had a corrupted install and re-installed the VS 2005 Web Application Project V1.0 Release to no avail. I am still getting the same error.
If I open a browser and navigate to http://localhost/MyDNNProjects, the site works as expected but I loose the ability for debugging and Edit and Continue Support.
I would expect similar results from both commands.
Also note, that WAP only supports "Edit and Continue" with File System Webs hosted with WebDev.WebServer.exe. IIS WAP projects do not support "Edit and Continue"
I get the "Object reference not set to an instance of an object" ONLY when running WAP. I tried the new WebSite (http://localhost/NewWebSite) and when I press F5 I get the browser and I am able to debug without any
problems.
Now, I have a couple of new WAP projects running under IIS as opposed to File System.
As you can see, this is really odd since (like you mentioned) both commands should have similar results.
Thank you for your help and I really, really hope you can shed some light into this.
I unistalled C# 2005 Express and Visual Web Developer 2005 Express, thinking one of these applications was the culprit for my issue. Then, I re-installed VS2005, the update for VS2005 to use WAP, and WAP.
RESULT
I am getting the same error message.
I am really frustrated since I would expect this functionality to work as expected. Am I am the only one having this issue?
Hey Luis, send me a message at BradleyB@microsoft.com and I'll forward directions on how to create a debug dump when the error happend. Once I get that I maybe able to help identify what is going on.
I would like to express my deepest gratitute for all your help in getting my issue resolved. You're the man !!!
In case anybody else is having a similar issue, here's what worked for me:
THE PROBLEM
I was getting "Object reference not set to an instance of an object" in a Web Application Project as soon as I hit the F5 key (or CTRL + F5) to debug.
THE CAUSE
I think what caused my issue was the fact that I installed FireFox a few months ago and made it my default browser. I was having problems with FireFox in that I was not able to view or run some ASPX websites so I uninstalled FireFox. I then decided to install
Advanced Browser (http://www.advancedbrowser.com) and made it my default browser. And again, I uninstalled Advanced Browser for other issues I was having and I think one of these two browser's messed up my Registry.
THE SOLUTION
The following registry key was misteriously removed from my system, therefore WAP failed.
As we are facing a similar problem (VS2005sp1 installed on a MOSS2007 farm): when we create a new Sharepoint-Webpart project in a brand new blank or an existing solution we are perfectly able to deploy the webpart without errors. UNTIL we switch from release
to debug or vice versa. AFTER that the web-part project builds without errors or warnings - but we are no longer able to deploy due to "Object reference not set to an instance of an object" sadly enough without further information.
(It used to work OK)
Hope you can help
Best regards
Erik Bo
BradleyB
Hey Luis, send me a message at BradleyB@microsoft.com and I'll forward directions on how to create a debug dump when the error happend. Once I get that I maybe able to help identify what is going on.
i have a similar problem but only have that error: 'Object reference not set to an instance of an object' when i want "Publish web site". The strange thing is that days before i could publish web site and now no. Anybody has a idea?
stpeteluis
Member
715 Points
143 Posts
Object reference not set to an instance of an object - Web Application Project
Aug 09, 2006 01:38 AM|LINK
A little background
I installed the VS 2005 Web Application Project V1.0 Release (installation was successfull) and followed Scott Guthrie's tutorial to the letter (below)
Tutorial 1: Building Your First Web Application Project
http://webproject.scottgu.com/CSharp/HelloWorld/Helloworld.aspx
However, I am getting the following error in My First Web Application Project: "Object reference not set to an instance of an object." This happens as soon as I hit the F5 key (or CTRL+F5 key).
Note: The solution builds correctly and the assembly is created in the /bin directory (MyDnnProjects.dll)
My dev environment:
Am I missing something? Can you help? Thanks.
stpeteluis
Member
715 Points
143 Posts
Re: Object reference not set to an instance of an object - Web Application Project
Aug 10, 2006 01:56 PM|LINK
UPDATE:
I re-installed Visual Studio 2005 Team System thinking I had a corrupted install and re-installed the VS 2005 Web Application Project V1.0 Release to no avail. I am still getting the same error.
If I open a browser and navigate to http://localhost/MyDNNProjects, the site works as expected but I loose the ability for debugging and Edit and Continue Support.
Anybody experiencing the same behaviour?
BradleyB
Participant
1197 Points
230 Posts
Microsoft
Re: Object reference not set to an instance of an object - Web Application Project
Aug 11, 2006 04:34 PM|LINK
Do you only get the "Object reference not set to an instance of an object." when running WAP?
I'd like you to quickly verify the behaivor of new WebSite, http://localhost/NewWebsite F5
and new project Web Application Project, change to IIS, with http://localhost/NewWAP F5
I would expect similar results from both commands.
Also note, that WAP only supports "Edit and Continue" with File System Webs hosted with WebDev.WebServer.exe. IIS WAP projects do not support "Edit and Continue"
Let me know what you find out.
Thanks, Brad.
stpeteluis
Member
715 Points
143 Posts
Re: Object reference not set to an instance of an object - Web Application Project
Aug 12, 2006 03:19 AM|LINK
Brad,
I get the "Object reference not set to an instance of an object" ONLY when running WAP. I tried the new WebSite (http://localhost/NewWebSite) and when I press F5 I get the browser and I am able to debug without any problems.
Now, I have a couple of new WAP projects running under IIS as opposed to File System.
As you can see, this is really odd since (like you mentioned) both commands should have similar results.
Thank you for your help and I really, really hope you can shed some light into this.
- Luis
stpeteluis
Member
715 Points
143 Posts
Re: Object reference not set to an instance of an object - Web Application Project
Aug 14, 2006 01:53 PM|LINK
UPDATE
I unistalled C# 2005 Express and Visual Web Developer 2005 Express, thinking one of these applications was the culprit for my issue. Then, I re-installed VS2005, the update for VS2005 to use WAP, and WAP.
RESULT
I am getting the same error message.
I am really frustrated since I would expect this functionality to work as expected. Am I am the only one having this issue?
BradleyB
Participant
1197 Points
230 Posts
Microsoft
Re: Object reference not set to an instance of an object - Web Application Project
Aug 14, 2006 05:26 PM|LINK
Hey Luis, send me a message at BradleyB@microsoft.com and I'll forward directions on how to create a debug dump when the error happend. Once I get that I maybe able to help identify what is going on.
Brad.
stpeteluis
Member
715 Points
143 Posts
Re: Object reference not set to an instance of an object - Web Application Project
Aug 17, 2006 04:09 PM|LINK
Brad,
I would like to express my deepest gratitute for all your help in getting my issue resolved. You're the man !!!
In case anybody else is having a similar issue, here's what worked for me:
THE PROBLEM
I was getting "Object reference not set to an instance of an object" in a Web Application Project as soon as I hit the F5 key (or CTRL + F5) to debug.
THE CAUSE
I think what caused my issue was the fact that I installed FireFox a few months ago and made it my default browser. I was having problems with FireFox in that I was not able to view or run some ASPX websites so I uninstalled FireFox. I then decided to install Advanced Browser (http://www.advancedbrowser.com) and made it my default browser. And again, I uninstalled Advanced Browser for other issues I was having and I think one of these two browser's messed up my Registry.
THE SOLUTION
The following registry key was misteriously removed from my system, therefore WAP failed.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE
By adding the following values so that they point to where iexplorer.exe is installed my WAP error went away:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE]
@="C:\\Program Files\\Internet Explorer\\iexplore.exe"
"Path"="C:\\Program Files\\Internet Explorer;"
Again, Thank you for all your help !!!
ErikBo
Member
2 Points
1 Post
Re: Object reference not set to an instance of an object - Web Application Project
Aug 28, 2007 08:48 PM|LINK
Hey Brad
As we are facing a similar problem (VS2005sp1 installed on a MOSS2007 farm): when we create a new Sharepoint-Webpart project in a brand new blank or an existing solution we are perfectly able to deploy the webpart without errors. UNTIL we switch from release to debug or vice versa. AFTER that the web-part project builds without errors or warnings - but we are no longer able to deploy due to "Object reference not set to an instance of an object" sadly enough without further information.
(It used to work OK)
Hope you can help
Best regards
Erik Bo
VS 2005 .NET Visual Studio 2005
BradleyB
Participant
1197 Points
230 Posts
Microsoft
Re: Object reference not set to an instance of an object - Web Application Project
Aug 29, 2007 02:33 AM|LINK
How are you deploying to the webfarm? Are you using VS or some other process to push the binaries?
Thanks, Brad.
Bambu
Member
2 Points
1 Post
Re: Object reference not set to an instance of an object - Web Application Project
Aug 31, 2007 09:37 AM|LINK
hi,
i have a similar problem but only have that error: 'Object reference not set to an instance of an object' when i want "Publish web site". The strange thing is that days before i could publish web site and now no. Anybody has a idea?
Thanks