Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB.Net

Options
  • 04-01-2005 12:52pm
    #1
    Closed Accounts Posts: 530 ✭✭✭


    Hi all,

    I'm brand new to .net programming and have been having some problems getting my first web app up and running. It works just fine, including SQL Server connectivity, when I run it on my local machine, using the web server that comes with Visual Web Developer. I copied the site to a production server (running IIS) and built it there, giving no errors but, when I attempt to run the site, all I get is the following error:
    ==========================================================
    Failed to access IIS metabase.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.

    The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see http://support.microsoft.com/?kbid=267904.
    ==========================================================
    Now, I've done, as far as I can tell, everything mentioned in the MS document and even enlisted help from the resident expert, all without success. Anyone got any ideas cos I've been beating my head against the wall about this for a few days and have now developed a flat spot. :confused:


Comments

  • Registered Users Posts: 604 ✭✭✭Kai


    Im no Expert but it looks like the User that IIS is using doesnt have write access to the W3SVC folder. Can you check to see what User IIS is using (its in the Properties of IIS) and see what rights it has on that machine.


  • Closed Accounts Posts: 530 ✭✭✭Garibaldi


    There's the usual Administrator, Everyone, IUSR_<servername> and the ASPNET user under the Operators tab. Using metaacl to find out the permissions of the ASPNET account shows Read, Write, Restricted Write, Unsecure Properties Read, Enumerate Keys and Write DACL. Pretty much every permission under the sun, then. Still doesn't work, though. :(


  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    Some questions:-

    How did you build it on the server? Command line/Visual Studio/Visual Web Developer? - You should nnot have to rebuild a project on the production server.
    What version of the .Net Framework are you using? Visual Web Developer is version 2 (beta) only and not for production currently.


  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    Since you have it installed on the server. Did you step through the code on the server?


  • Closed Accounts Posts: 530 ✭✭✭Garibaldi


    It was built using Visual Web Developer. About not having to rebuild, having built it in test, is just using the Copy Website facility sufficient?
    I'm using .Net Framework version 2.0.40607.0. I know VWD is still in Beta, just trying to leapfrog ahead in the Keeping Up With The Cubicle Neighbours' game. ;)
    This little project I'm working on is basically to help me learn VB.Net and is (well, would be if it worked) running in tandem with the old VBScript version. The production server is being used to see how the VB.Net version performs compared to the older one.
    I thought, originally, I'd bitten off more than I could chew. Then, when it all worked so nicely on my local machine, the SAD wore off. Now, however, having hit this wall, it's back with a vengeance. :rolleyes:


  • Advertisement
  • Closed Accounts Posts: 530 ✭✭✭Garibaldi


    Stepping through the server code using VWD causes the built-in webserver to fire up and, unhelpfully, the code works just fine using that. Is there another method I should be using that will be more helpful for seeing what's happening in IIS? Any .Net SDK tools I should download? In some ways, as my old boss used to say, I may aswell be staring into a bush. If that makes any sense. :)


  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    You should be able to deploy an application without compiling. Just copy aspx/ascx/masterpages etc along with your dlls. I'm not overly familiar with .net 2 yet as my boss wouldnt be too happy if I started messing with stuff we can't use yet but is it not possible to set VWD to not use it's built in web server?


  • Closed Accounts Posts: 530 ✭✭✭Garibaldi


    The boss is happy as long as he doesn't know what I'm up to. ;)
    If VWD can be set to use IIS only, I haven't been able to find how to do it. Yet.


  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    I'm missing somehting here. Whats the built in webserver. On my XP machine my ASP projects are using IIs.


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    I tend to be suspicious of anything that tries to do stuff automatically for you. As suggested, try manually copying your files and see if they work. Also do plain old ASP pages work on the production server ?


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    There is a possible solution on this page:- http://www.aewnet.com/nntp/id-98274.html

    Ricardo - ASP.Net runs primarily on IIS but since the ASP.Net Web Matrix (web page development tool) there have been other options for developers. In the case of the Web Matrix tool there is a web server called casini for people who may not have IIS (using WinXP Home for example). I would imagine VWD is providing a similiar option.


  • Closed Accounts Posts: 8,264 ✭✭✭RicardoSmith


    ASP.Net Web Matrix (web page development tool) - Didn't know about that. Cheers.


  • Moderators, Science, Health & Environment Moderators Posts: 8,950 Mod ✭✭✭✭mewso


    Yeah tis free and all. It's weakness is it doesn't compile your code so it's not very code behind friendly but it's not bad - http://www.asp.net/webmatrix/default.aspx?tabIndex=4&tabId=46


  • Closed Accounts Posts: 530 ✭✭✭Garibaldi


    Musician - tried that one already. It's one of the few hits that came back on a Google. Sadly, it hasn't worked either. That said, I adjusted a command line compiler option just now and it's at least switched to a more understandable error. It's a "You are not authorized to view this page" job now. It might prove to be a little easier to sort from here but, knowing MS and throwing Beta versions into the mix, it'll just be the next Alp in the range. :)
    Thanks all for the help so far!


Advertisement