Beginner asp.net Some common problems and solutions to developing Web applications

Source: Internet
Author: User

First question: Install Microsoft Visual Studio. When NET2003, IIS is not installed, but it is installed after IIS, in which case the Web application is created with an error

Workaround: Run the following command in the command Prompt window:
%windir%/microsoft.net/framework/v1.1.4322/aspnet_regiis.exe-i

second question: Regarding the configuration of IIS, it is best to configure the following after installing IIS, otherwise you may report some permissions errors when you run Web applications

Workaround:
The first step: Open IIS, right-click Default Web Site-----〉properties
Step two: In the pop-up window, click the Directory security-----> Edit ...
Step three: In the pop-up window, select the bottom Integrated Windows authentication check box
Fourth step: Click OK all the way

third question: Problems with Web service proxy classes in Web application, run Times page error as shown below
The request failed with HTTP status 401:access Denied.

For example: WebForm1.aspx.cs has the following code:
private void Page_Load (object sender, System.EventArgs e)
{
Webservice.service1 ss=new WebApplication1.webService.Service1 ();
Response.Write (ss. HelloWorld ());
}
Where Webservice.service1 is a Web service proxy class

Workaround: Add one line of code (the red code shown below)
private void Page_Load (object sender, System.EventArgs e)
{
Webservice.service1 ss=new WebApplication1.webService.Service1 ();
Ss.credentials=system.net.credentialcache.defaultcredentials;
Response.Write (ss. HelloWorld ());
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.