|
I did follow the instructions when copying an ASP.NET application from the server to my local computer for debugging, compiled without any problems. However, I can't seem to display it from the broswer, not errors generaged though. Did I miss anything? Thank you!
|
|
|
|
|
Hi, Lian_H.
What versus of ASP.NET are you using, 1.1, 2.0 or higher?
Thanks,
Harry
|
|
|
|
|
I am writing a Build automation script.
I want to use the COPY PROJECT utility of VS.NET 2003 through command line.
Can you please help me in getting the command line interface for COPY PROJECT Utility in Visual Studio .Net 2003??
Thanks in advance.
Lochan
Lochan Pandya
|
|
|
|
|
Hello,
I've follwed the same way as you explained in the article. But still i couldn't run the application in the new system. I am getting different error.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS
Error in web.config file at "<authentication mode="Windows">
I changed to none. But couldn't succeed.
Prev my project is in laptop, win XP Prof.
Now is Win 2000 server. Dotnet F/W 1.1
I checked in IIS settings also. No problem there. Other applications in the new system are running well.
whats the error.
|
|
|
|
|
A couple things. First, was your application running on v1.1 or a new or older version? If so, you need to create a new application pool to accommodate the different frameworks on the server.
If not, then is this application outside the application root? (wwwroot). If so, you'll need to make your project folder into a virtual directory.
As a test, delete the authentication tag and see if it runs. If you need authentication then the issue may be that your password of your ASPNET account does not match that of the machine.config.
Lastly, in the IIS console, right click your project and select the ASP.NET tab. Make sure the correct version of .NET is chosen for your application in the dropdown menu.
Hope one of those helps!
Harry
|
|
|
|
|
Hello,
thanx for the reply.
1. I am using .NET F/W 1.1
2. In my prev system(XP Prof), i made changes in machine.config to run under system, impersonate to access my access database.
3. My Application is outof wwwroot. I created virtual folder also
thanx
|
|
|
|
|
This sounds like a more specific issue. It is not recommended to give the machine.config userName the SYSTEM value because it gives your application too much power since it is an admin account. I would suggest changing back to machine, password to AutoGenerate and use straight ASP.NET app impersonation.
|
|
|
|
|
Hello,
That is in my laptop(Win XP Prof) only i have given username as SYSTEM in machine.config
Bcoz i am not able to process access database. SO according to one cyber friend suggestion, i changed like that. After that i can able to process access database. The same project, i copied to my work system(win 2k server). Here i got the problem in web.config file. The error i have sepecified in the first post.
I made another application and added all the forms and built. S'day night, i copied the same to my laptop. The same error. So, i created another application and added all forms from the folder.
If this is the case, every time i copy to new system, I need to create another project. How can it be suitable?
I think you got my point.
thanks for the reply.
|
|
|
|
|
Hi,
I developed an ASP.net application using VS.Net in C#.
When I run it in the computer in which it was developed, I do not have any problem.
But when I uploaded the web app to the server via ftp, for this example let's say
www.mydomain.com, the upload was successful, but I can not access the web app from the browser.
http://www.mydomain.com/myapp.
I receive a server runtime error, but I can not see the specifics, it says that I need to change the config file for the errors to be displayed in the client. I did but still could not see the specifics.
If this query is not clear.
My question is simply, how to upload you web application to be accessed anywhere on the Internet.
Thanks for the help.
-- modified at 18:47 Friday 3rd March, 2006
|
|
|
|
|
You have to make your project folder on the server that you are copying your project to, into an application folder. If you haven't done this, then that type of error will be generated. Go through steps 9 to 13 of my article and verify that you done this on your destination server folder.
|
|
|
|
|
Hi
How can I call an App pool if an aspx page is in another pool? Is it possible? Because I need the sessions vars and I can't retrieve them because I'm in different pool I think.
For example I have the "A" directory and this is an app pool, but I've created an subdirectory and I've turned it into App pool, this last one contains an aspx page which refers to "A" application ("Inherits")
|
|
|
|
|
If you're original project is something like:
C:\Inetpub\wwwroot\A\Default.aspx
The virtual corresponding path would be: http://localhost/A/Default.aspx
Now you copy to another machince which now includes a subdirectory, as you said. Then the structure would be as such:
C:\Inetpub\wwwroot\A\B\Default/aspx
The corresponding virtual path: http://localhost/A/B/Default.aspx
Your csproj.webinfo (or vbproj.webinfo) file would have to be updated from:
<VisualStudioUNCWeb>
<Web URLPath = "http://localhost/A/A.csproj" />
</VisualStudioUNCWeb>
To:
<VisualStudioUNCWeb>
<Web URLPath = "http://localhost/A/B/B.csproj" />
</VisualStudioUNCWeb>
|
|
|
|
|
Thanks for addressing this issue. I was going crazy till I ran across your solution. Just wanna say thanks!!
Prov. 3:5-6
|
|
|
|
|
Your welcome. I'm glad this article can help, especially to save valuable time which we all need!
|
|
|
|
|
Hello ,
I wanted to give a detailed description of the error thats occuring when i try to write to my event log.
Server Error in '/ASP.NetProjects/EventLog' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Hope Someone can help me out in regards to this.
Aanchal.
|
|
|
|
|
Thank you Harry.I was actually making a mistake in typing the filename was giving a space that wasnt required.Am sorry to have wasted your time.But have learnt a valuable lesson.
I have one more error i get while trying to write to the eventlog.The error says that I have no registry Access.
I am logged on as an administrator, have set the trust level to high and identity impersonate = true in the web.config file,and have created a new key called test in application in the eventlog and set the read and fullcontrol to user tht i'm logged on as .I have set the event source of the eventlog i have created to test.But I'm getting the error as Access Denied.
I'll be glad if anyone could help me out.
Thank you ,
Aanchal.
|
|
|
|
|
Aanchal,
Are you using the v2.0 Framework?
Harry
|
|
|
|
|
Aanchal,
I found this posted online recommendation, however, I did not try, nor take responsibility for any issues, due to the fact that it requires changes to your registries. So use at your own risk:
1. Give the ASPNET user permission to read the Security eventlog registry entry.
Run regedt32
Navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security
Right click on this entry and select Permissions
Add the ASPNET user
Give it Read permission
2. Change settings in machine.config file
Run Explorer
Navigate to WINDOWS or WINNT folder
Open Microsoft.NET folder
Open Framework folder
Open v1.1.4322 folder (folder name may be different, depending on what dotnet version is installed)
Open CONFIG folder
Open machine.config file using notepad (make a backup of this file first)
Locate processmodel tag (approx. at line 441)
Locate userName="machine" (approx. at line 452)
Change it to userName="SYSTEM"
Save and close the file
Close Explorer
3. Restart IIS
Run IISReset (Start > Run , type IISReset and click OK)
-- modified at 10:47 Saturday 17th December, 2005
|
|
|
|
|
No I am using the 1.1 framework.
|
|
|
|
|
Hi Harry,
Your article was very informative. But when i tried to implement it on my computer it still gives me the same problem.
I have a simple helloworld kind of application that runs on my computer at work.I emailed it to myself and copied it onto my laptop.I followed the steps you gave. Then i went to VS.Net and tried to open the C# Project Folder.It is then that it gives me the same error.
I don't know how to proceed now.Please help me out as i'm just trying to learn working on .Net now.
Thank you
Aanchal.
PS:I would be thankful if anyone else who knows about this can send me an answer.
|
|
|
|
|
Hi, Aanchal.
Here is a summary of checks for what you need to do:
Example project name: HelloWorld
1. Copy A:\HelloWorld to C:\Inetpub\wwwroot\HelloWorld
2. Since I am not changing any folder names and have no subdirectories, I can leave the HelloWorld.vbproj.webinfo with the web path:
Web URLPath = "http:/localhost/HelloWorld.vbproj" />
3. Change the C:\Inetpub\wwwroot\HelloWorld folder into an application (see steps 7 - 13).
4. Open in VS.NET.
If that doesn't work, let me know, but that should be all you need to get it running.
--Harry
|
|
|
|
|
i followed the steps given by u on the network computer( in school) and it still says in a message box
" the webserver reported reported the following error when attempting to create or open the Web project located at the follwing location URL:'http://Localhost:/New Folder'.'HTTP/1.0 503 Service Unavailable'"
New Folder is my folder in which all project and accessory files are located.
can u give me a way to get out of this.
2. The application iam trying to create is a webpage with username and password which is connected to a data base table for verification. and it is working fine. THis directs to an another page which is a questionnnaire. After filing the questionnaire when user clicks OK it should be stored/updated in an another data base table. THis is not working throwing an exception that it should be and updateable query.
THe same code works fine in VB.net not in ASP.
please give me solutions and code.
thank u
sidda
|
|
|
|
|
Sidda,
Your first issue looks like it is due to the fact that your school does not allow .NET applications to be developed their network because IIS is not configured for security reasons. My school does not allow development on the network or lab computers because of security issues with using IIS. Make sure you can develop applications and use IIS on your school network. If you can use the network, your domain would not be LocalHost like you have above, it would be the domain they set up.
The second issue is most likely because there was some unsuccessful attempt to modify your database with the code not properly allowing the thread to be freed. The temporary fix to get you out of the problem, is press Ctrl+Alt+Del, look for the ASP.NET worker process which is aspnet_wp.exe, kill that process, which will free the lock.
To prevent it, you need to write code that will free the resource on the database application with a try/catch/finally block. That way if any background errors/locks occur, the finally block always executes. Here is a code snippet:
Try
conn.open()
cmd = new OleDBCommand("SomeStoreProcedure", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.ExecuteNonQuery
Catch e As OleDbException
e.StackTrace.ToString()
Finally
conn.close()
End Try
|
|
|
|
|
Hi All
I have web application I am develop success already in my computer
if I want to use my web application on another computer
How I must to do?
Please help me
Thanks,
Nisarat
|
|
|
|
|
Nisarat,
All you have to do is copy your entire project folder to another computer in the web root directory or a subdirectory within the web root directory (C:\Inetpub\wwwroot\). Depending on what folder you initially created the original project will determine if you need to follow my steps in my article.
If you created the original in 'C:\Inetpub\wwwroot\MyProject'
and are copying to another computer like -
'F:\Inetpub\wwwroot\MyProject',
Then since you are putting it in the same location, then the webinfo file should not need modified.
If you are copying from 'C:\Inetpub\wwwroot\MyProject' to 'F:\Inetpub\wwwroot\Projects\MyProject',
then follow the steps above.
IMPORTANT: In either case, no matter what, you still need to change the folder in IIS to an application, as specified starting with step #7.
Harry
|
|
|
|