Results 1 to 17 of 17

Thread: Visual Studio .NET 2003 Problem creating a new ASP.NET Project

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53

    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.

    Any help or hint will be gladly appreciated

    Cheers,
    Scand

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Is this when you try to view the page with Internet Explorer... if so, have you done a full compile?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    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.

    Any idea?

  4. #4
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    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.
    Magiaus

    If I helped give me some points.

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    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.

  6. #6
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Have you run aspnet_resiis -i on the remote server?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  7. #7
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    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?

    Hmmmm...Can you zip and post the source code?

    Woka

  8. #8
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    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
    Magiaus

    If I helped give me some points.

  9. #9

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    Woaw... thanks for all your help.

    What exactly does "aspnet_resiis -i"?

    @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?

    Thanks again for all your help

    Cheers,
    Scand
    Attached Files Attached Files

  10. #10
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    aspnet_regiis -i

    intalls that version of dot net to all IIS Sites

    try aspnet_regiis -? first

    usually aspnet_regiis -c will do just fine. I think -i is a bit extreme but needed at times.
    Magiaus

    If I helped give me some points.

  11. #11
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    That's strange.
    I opened the project...and I got the same error you did...plus when I ran it I got an error in the Global.asax class....Hmmmm...

    Then suddenly it worked!

    What I did was open both the webform1 and global classes. Ignored the errors, then saved the project. And WOOF it all worked.

    That project is a BRAND NEW web app.

    Hmmm...try creating a new web app from scratch and run it straight away. Does it work?

    Woof

  12. #12

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    @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...

  13. #13

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    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?

  14. #14
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    SP2 has that funky firewall built in... so it could be interfering with IIS?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  15. #15

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    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.

    I wish you all a nice and relaxing weekend

    Cheers,
    Scand
    Last edited by Scand; Sep 17th, 2004 at 11:04 AM.

  16. #16

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    @Wokawidget
    What version of Visual Studio .NET 2003 have you used?
    - Standard
    - Professional
    - Enterprise Developer
    - Enterprise Architect

    I'm now trying to get my hands on a professional version, maybe this will help...

  17. #17

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Switzerland
    Posts
    53
    Finally I got it working...

    This is what I did:

    Uninstalled Visual Studio 2003 .NET (English Version)
    Uninstalled .NET Framework 1.1 (German Version!)
    Uninstalled .NET Framework 1.1 SDK (German Version!)

    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.

    Cheers,
    Scand

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width