# How to run ASP.NET code



## farooqi123 (Jun 30, 2005)

I am new to ASP.NET but have some experience in ASP. I have written a very simple code like...

*My First ASP.NET Application*

<%Response.Write(now())%>

and saved the file as First.aspx in wwwroot folder of Inetpub folder. I opened Internet Explorer and typed...

http://localhost/First.aspx

the browser just displayed 'My First ASP.NET Application' while I was expecting current date and time as well. There was no error displayed. I have tried almost all the options but still I am unable to get the output. I also tried to save the file with ASP extension, then it was working but with ASPX extension only HTML part of the code is working, for the rest there is no output.

I have also installed .NetFramework 1.1 SDK but still no result.

CAN ANY BODY HELP ME.....I WILL BE REALLY VERY THANKFUL TO HIM


----------



## Rockn (Jul 29, 2001)

You have to have the .Net framework installed to have .Net scripted pages run in IIS. I think you also have to define the dll in IIS manager.


----------



## farooqi123 (Jun 30, 2005)

Thank u very much for ur reply.....but still I am unable to run the ASP.Net code. Can plz tell me step by step how to proceed after saving the ASP.NET code in wwwroot folder of inetpub....

I will be really very thankful to u


----------



## Rockn (Jul 29, 2001)

What do you mean saving the code in the root? All you need is to create an HTML page with your code in it and save it to your web server. The server if it is set up correctly will process the .net coding and return the results to the browser.


----------



## farooqi123 (Jun 30, 2005)

Mr. Rockn, Thank u very much for ur kind response.... I am really thankful to you but I think I m a stupid fellow as I dont know HOW TO SET UP WEB SERVER. I though that just to install IIS from Control Panel is enough to make the web server. After that some one told me that save ur web files in C:\INTETPUB\WWWROOT folder and type http://localhost/FileName.aspx in the address bar of the web browser and you will get the output ... Now I think that have to do some thing else,

CAN U PLZ HELP ME HOW TO SETUP THE WEB SERVER

I have installed .NetFramework 1.1 SDK (from internet) and IIS (from Control Panel).


----------



## Rockn (Jul 29, 2001)

You have to open the onternet services manager and define your web site if IIS is already installed. here is a tutorial to get you started:

http://www.startvbdotnet.com/aspsite/extras/deploy2.aspx


----------



## farooqi123 (Jun 30, 2005)

Thank u very much.....I have sucessfully done, thank u once again..... my ASP.Net code is now working, but now I got another problem......hahhaaaa....

I also got Visual Studio.Net and I have developed some VB.Net sample projects. I tried to develop an ASP.Net application. I just draw a text box and tried to run the application but the following error was raised....

' Unable to start debugging on the web server. debugging failed because integrated windows authentication is not enabled '.

I tried to enable the integrated windows authentication but could not find it....... Can you please me again in this regard, I am sure that with your guidence I will be able to solve this problem too....

Thank u so much for being so kind so far


----------



## Rockn (Jul 29, 2001)

Authentication is on the security tab for your web site. You have to disable anonymous access and set it to Windows authentication.


----------



## farooqi123 (Jun 30, 2005)

Thank u again for providing the hint...... I have enabled the WINDOWS AUTHENTICATION and DISABLED ANONYMOUS ACCES, now the error is like this....

'Error while trying to run the project: Unable to start debugging on the web server.'

Let me remind you that I want to create ASP.Net application in Visual Studio.Net. When I run the project/application then the above error was raised....

Looking for your further guidence..... Thanks in advance


----------

