Click here to Skip to main content
14,866,383 members
Please Sign up or sign in to vote.
3.22/5 (3 votes)
See more:
Hi all,
i have developed a web forms app. i was trying to publish my application to remote server.
1- i downloaded and installed web deploy management on my remote server.
2- created an IIS Manager user.
3- publish my app. from VS 2012.

everything went well, preview was successful,
but when click publish i got this in VS (output)

(2015/03/17 11:20:52) An error occurred when the request was processed on the remote computer.
The server experienced an issue processing the request. Contact the server administrator for more information.
Publish failed to deploy.

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========


i check connection to the server and user, all is good. what could be the reason?

please advise
<
thanks in advance
Samira
Posted
Comments
Sergey Alexandrovich Kryukov 17-Mar-15 11:45am
   
Not enough information (isn't it obvious?)
When you use a form, it makes sense only if you handle HTTP request send by "Submit" on the server side, but we cannot see your ASP.NET code. Due to quick spring warming, my access to your hard drive is somewhat limited. :-)
—SA
Joan Magnet 17-Mar-15 12:30pm
   
Can you publish it in a shared folder?
ZurdoDev 17-Mar-15 12:34pm
   
Check event viewer on the server.
Samira Radwan 18-Mar-15 8:42am
   
System.UnauthorizedAccessException: Attempted to perform an unauthorized operation. at System.Security.AccessControl.Win32.SetSecurityInfo
ZurdoDev 18-Mar-15 8:45am
   
Permissions issue of some kind then. Just do a build and then copy your files over to the server.
Samira Radwan 18-Mar-15 8:47am
   
thanks @RayanDev
i managed to publish to local folder i will try to copy it to the virtual directory and see :)

thank you!
jgakenhe 18-Mar-15 9:00am
   
If this is not a first deployment, please make a backup of the virtual directory. That means copy all the contents and put in another location; in fact I make a backup every single time I do a production deployment. The reason is that if there is a problem, I can quickly rollback to the previous version and no harm is done.
Samira Radwan 18-Mar-15 9:44am
   
hi @jgakenhe
it's my first deployment. i have never tried to publish a web app.
i published the web forms app. to a local folder then i created a new website directed location to a folder where i copied my web app. from local folder.
BUT i noticed it published without (.CS) files[is it normal?] + i can't browse the site.
AND if i create a virtual directory should i copy the same contents to it?

Please advise, i'm completely lost!!
jgakenhe 18-Mar-15 10:03am
   
Yes. .Net compiles the .cs files into one .dll file that can be found in the Debug or Release folders. The name of the DLL file will be the same as the name of your project. The reason for this is for performance and so people can't snoop your .cs code. For example, if you have a database connection, you don't want anyone to be able to see it; otherwise they'll be able to get into your database.
Samira Radwan 18-Mar-15 10:15am
   
ok, thank you now i understand!
for the correct procedure to create a website:
1- right click IIS Sites>> Add website
2- add the website name & physical location (e.g D:\test-site).
3- in (D:\test-site) i should paste the contents of the published web app. from my local machine.
4- right click the website to create virtual directory
5- copy the same contents of (D:\test-site) to this directory
6- set the default document of the website (e.g Home.aspx)

are these steps correct?
please advice
thank you
jgakenhe 18-Mar-15 10:22am
   
Looks correct. Here's a youtube video I've seen that maps out the steps.

http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=7&cad=rja&uact=8&ved=0CEoQtwIwBg&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPRcVGakKnhY&ei=hIkJVbnaEIeBygTZx4DADQ&usg=AFQjCNF1q7azYzt1iZBVqjzmNw23yDGx9g&sig2=ZY2gT9hfcIIdlknll_xaww&bvm=bv.88198703,d.aWw
Samira Radwan 18-Mar-15 10:37am
   
thank you

1 solution

I typically publish it to a share folder on my local machine through the Visual Studio Publish Tool (right click on the project and you'll see it). Then I copy the contents of the shared folder to the server into its virtual directory. If this is not an initial deployment, then DO NOT copy out any .config files or contents of the App_Data folder.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900