views:

60

answers:

2

Hi,

Is it possible to debug (with VS 2008) a site at my host? I have no particular control of the server, I'm only allowed to upload my website files to the server. I can however upload .pdb files etc.

The reason for me wanting this is because the site works fine on my dev machine, but refuses to show even the first page when deployed on the server (404-error).

+1  A: 

Debugging requires that certain debugging components are installed and enabled on the server. This is highly unlikely to be the case on any production hosting platform.

Contact your hosting provider - they will usually be quite willing to help you diagnose the problem you are encountering.

Gareth Saul
Try adding logging to your code. THis will help you to indirectly diagnose the issue. Also a 404 error means that most probabily, control never reaches your code.
Ganesh R.
+1  A: 

Maybe a long-shot, but in my experience the "works-on-my-machine-but-returns-404-on-the-server" problem is often a consequence of that the WebServer Extension "ASP.NET v2.0.50727" is prohibited.

As Ganesh R points out, it may sound like your application never gets startet.

As for the debugging part, I don't think you would be able to pull that off...

Jon Andersen
kaze
Normally this could be checked in the IIS manager on the server. (Under Administrative Tools in the control panel). Directly beneath the server-node, you have a folder named "Web Service Extensions". In this folder you would find the "ASP.NET v2.0.50727" node (which has to be Allowed in your case, since you are running on this platform (the MWPSK is base on this).However, if you don't have any control over this server (maybe it it a 3rd party hosing site?), then you should make sure you have the proper rights to actually run an asp.net site in their environment.
Jon Andersen
I think that maybe something is configured wrong in web.config or some else place. The thing is that MWPSK worked fine in version 1.2.2 and this problem started when I upgraded to 1.3.0. I've made almost no code changes, and I also suspect that the code is not even executed. This error seem to occur before that (but I cant be sure).
kaze
OK, yes, I agree that none of your code is executed. What if you put a plain HTML page in your solution and try to access this...? Do you still the get 404-error? Also, try to access a specific aspx-page in your application? Do they all give you 404-errors?
Jon Andersen
Very interesting! I added a html-page, and that worked fine. Also, a few other aspx-pages worked (like Search.aspx and Login.aspx). When I've loaded for example Search.aspx, and I click the home-link, the 404 reappears.
kaze
One interesting thing is that Default.aspx does not work, and the home link, links to homepage.aspx, which does not exist, and what makes that even stranger, is that homepage.aspx work on my dev machine, even though it does not exist there either.
kaze
So, if I understand you correctly, when trying to navigate to the page named "Default.aspx" (by typing the full URL in your browser), you still get the 404? Even if you are 100% sure that this file is actually present in your solution?I'm just wondering if you somehow have messed up what is considered the "Default" page in your site. (In Visual Studio, right click the default.aspx file and choose "Set As Start Page")(I'm sorry, but I'm not familiar with the internals of the MWPSK, so I can only give you general advices)
Jon Andersen
Yes, that is correct, I get a 404 even when typing it in. And others (Search.aspx) works. I'm also 1sure that Default.aspx exists.I'm suspecing that this code might be a part of the problem: //create new empty page (the new homepage) WebPage rootPage = new WebPage(); rootPage.VirtualPath = "~/Homepage.aspx"; rootPage.NavigationName = "Home"; rootPage.AllowAnonymousAccess = true; rootPage.Visible = true; rootPage.SaveData();the homepage.aspx does not exist as a file, not on the dev machine or on the server.
kaze
Alright, problem solved! The data folders permissions was reset, and all write-permissions were removed. Changing back the permissions solved the problem. Probably, a temporary page is needed to be created.
kaze
Very good! Thanks for posting the solution.
Jon Andersen