View Full Version : ASP.NET C# Publish Help

12-23-2011, 02:47 AM
Where I work we got a new job. Its maintenance of a website:http://www.c-ibo.org

The previous programmer left the customer and us out in the cold, he wont return our calls. I'm a mac user with basic HTML & CSS Skills, nothing like ASP.NET C#.

I need to make small changes in the meantime, while the customer looks for a more competent programmer with ASP.NET C# experience.

I borrowed a PC with Visual Studio 2010. I got to add a new page. Right click on the folder on the project, theat i need to add a new page to, with the codebehind .cs file seperate, preview the page, looks fine, hit build, then publish to file, the upload via ftp. The new page wont load this is what I get after clicking the link:http://www.c-ibo.org/Error.htm?aspxerrorpath=/Information/Article/2011/ResearchImpactIBSchools.aspx the correct filepath should be http://www.c-ibo.org/Information/Article/2011/ResearchImpactIBSchools.aspx

Any quick ideas on what I'm doing wrong, and what I can do to resolve this, would be great, like I said I told the customer we can't do it, but we need to at least get a few things updated and changed while they look for a programmer with ASP.NET C# experience.

12-23-2011, 04:57 PM
Hey jmk1788,

No way to tell exactly what them problem is based on what you provided. It looks like it's set to redirect to a custom error page Error.htm whenever some run-time error occurs. To verify this, look inside the Web.config file and find section named "customErrors". In any case, here's some advice:

Create a test environment where you can test your changes prior to putting them on a live site.
In this test environmment, turn off the custom error handling inside Web.config
In the new page you're trying to deploy, add property Debug="true" into the Page directive. So, it will look something like <% Page Language="C#" Debug="true" .... %>. At this point, when you hit the page, you should see all the error details.
I always say, in this situation, just start simple: Remove/comment out all the C# codebehind. Test just the aspx page. When that's working, just start adding the codebehind little bits and pieces at a time. This will help you identify what the problem is, if it's not so clear when looking at the error details mentioned in previous step.


12-23-2011, 05:00 PM
just an additional "fyi"
I agree commenting out everything and "getting it to work" on a basic level is a good idea, but make sure you leave the functions... if you comment out for example

btn_Example_Click(object sender, EventsAgrs e){...

and then you have a button that calls that you will error out- may end up spending hours chasing a problem you created by commenting things out

12-23-2011, 05:14 PM
Yes, absolutely. When I said "comment out all the codebehind", I meant only the code inside the methods. Sorry about that.