Visual Studio .NET 2003 Problem creating a new ASP.NET Project
Hi,
First off, I'm a newbie with .NET and ASP. My prior experience is with Visual Studio 6.0 (C++ and VB) and some web development with JSP / Tomcat. So please be gentle to me
I didn't really know where to put my question, hopefully this is in the right place.
My situation:
I have to set up and develop a Web/DB-Server for a new project. I have successfully installed windows 2000 server, sql server 2000, internet information server 5.0, .NET framework 1.1, sqlxml and other little tools and helpers.
On my development machine (win XP pro sp2) I've installed Visual Studio .NET 2003, .NET framework 1.1 SDK and tools and helpers.
Now I wanted to create a new .NET Web Application Project (VB Code) on the web-server via Visual Studio .NET. It all works fine, with one problem, Visual Studio won't create the codebehind files.
The class File "WebForm1.aspx.vb" specified as the codebehind for "WebForm1.aspx" could not be loaded. Make sure that the codebehind attribute in the page or control directive properly references an excisting code behind the file.
The wwwroot directory on the web server is a file share directory with all persmissions to it. Shouldn't Visual Studio create these files?
Or do I have to create them by myself (which is a little strange I think, since VS creates everything else)?
I have no clue how I can fix this. On the internet I couldn't find an answer to that problem. In different forums I didn't find the answer or the problem described. Even here....
I guess this has to be something really simple to solve, otherwise there should be more about that on the internet.
This is when I create a new project with Visual Studio. Right in the middle of the creating process (some files are beeing genereated) appears the error-message.
I suggest developing the project locally and then publishing it to the remote server. It seems like the best way. I'm hoping that in 2005 they have worked out some problems with this project mess. My 2002 VS.Net doesn't even setup the project corectly I have to go in and configure in manually after VS.Net generates the files and folders.
Thanks for the hint. I will start to develop it locally, so I can move on with the project.
Still I'm curious if there is a proper solution for that problem.
Plend, that fixes a permissions problem with the .NET framework folder...think it has something to do with source files.
What happens if you open IIS and try to browse the active directory that you have set up?
Another thing to try. When you run VS.Net setup there is a link to install remote components. You may need to install the remote dubbuger.
I also learned a trick of sorts today working on my own project problems. You can make a project on localhost ie http://localhost/project and then move it to your desired url edit the vsdisco file changing the url then you can open the project and it will live at the correct url.
Personally I think this is BS because if I want to make a website with vs.net I sure a hell don't want it running under localhost. VS.Net should have more options in the are like create new site or at least the ability to start a project in the root of a site instead of nesting it under localhost or where ever.
I know the permissions you would need to be able to just make a website from a remote machine are insane but there should be away to do this. For instance have the site setup empty on the server and have an option start root project or something.
I have a 400 page website in vs.net right now. To be honest I don't know that I could have broken it up into small application because every aspect of it ties in to every other aspect. It had to start from the root. I dunno maybe I don't understand the plan microsoft has to get me to buy Frontpage and vs.net........ every year
@Wokawidget:
Do you mean the Internet Information Service Manager (I'm not sure if this is the right expression because the server and IIS is installed in German)?
I can see and open the created directory, that isn't a problem and there are some generated files.
I've zipped the generated files and included the zip file here. I didn't do anything with the files, the files are freshly generated from Visual Studio.
@Magiaus
I'm not sure if I installed this feature.
I can find a Visual C++ Remote Debugger, but I guess this isn't the remote debugger you mentioned, or is it?
Thanks for the trick... I will try it.
I thought with VS.NET and the .NET Framework I will be able to quickly develop or quickly start to develop my project. But for now I'm struggling with the environment. I will try to read a book about VS.NET and ASP.NET.
Can someone name me a good book about VS.NET and/or ASP.NET?
@Magiaus
I run "aspnet_regiis -c", like you adviced. It worked fine.
After this I tried to create a new project but the problem still exists.
@Wokawidget
Hmm... I tried your solution but the problem is still there. I opened all files in the project and saved every single one of them. Closing and re-opening the whole project didn't help either.
What excatly have you done to get it working without this "codebehind-error"?
Could you tell me your system-specifications?
Which OS and so on...
I tried to create the project on the same machine as visual studio is located (Win XP Pro SP2 machine). The problem was still there.
I even created the 'WebForm1.aspx.vb' file manually (with some code in it) and tried to add it to the project (which wasn't working, nothing happened and the file wasn't in the project list afterwards). The error isn't solved. Everytime I want to open the WebForm1.aspx file in Visual Studio the error appears.
Strange... could this be because I have installed SP2 on my WinXP machine?
I read somewhere on the web that some people have problems with VS.NET after they installed SP2, but in my case, I have installed SP2 first and then VS.NET.
Could my VS.NET installation somehow be corrupted?
Or the .NET Framework 1.1 installation?
I switched it off as soon as I first saw it, so this shouldn't be the bugger who causes this whole mess.
The problem is even there if I want to create a new project on the same machine. It has to be something with my settings or the programs themself, I guess.
Thanks again for your effort to help me out with this problem.
I'm off for the weekend now and will be back Monday.
Afterwards I installed Visual Studio 2003 .NET Enterprise Developer (English) with an English version of the framework and the corresponding framework SDK in English.
Now I can create projects without getting any errors, all files are being created and I'm a happy man :-)
It has to be something with the different framework installations or with the Visual Studio version, but in my opinion it was the framework which caused the error.