I published a C# .net application to the wrong folder. I am using VS 2005. How do I unpublish the app to be able to republish in the correct folder.
I tried simply publishing to another folder and now the app will not run from either location.
You will need to manually delete all the published files from the wrong folder.
There is no "recall"/"unpublish" function in VS. All "publish" does is compile and copy compiled files and other included files and folders (images, css, js etc) to the specified directory.
Publishing is essentially just a copy of the built application to the destination folder, as far as I aware. This points to a different problem in your application as being the source of your error.
More than likely your app isn't working from either folder because it's configured to use asp.net 1.1 or doesn't have asp.net installed at all on the server. If it is installed, and both 1.1 and 2.0+ are installed, it will default to 1.1, and the folder needs to be configured to use 2.0+.
But other than that, you just delete the files from the server by hand.
Publishing function also creates "Application" on the IIS, so I would probably start by opening the IIS server with "Internet information services manager", and remove the application with the wrong folder.
Related
We have not been able to publish to Azure from Visual Studio (for Windows). We managed to do it with Visual Studio for Mac, but we just did not find the way in Windows. Publish seems to work with zero errors, but nothing seems to be pushed in reality. We have also realised we have created another App Service / Server somehow from Visual Studio, so maybe we are pushing to the wrong place not sure why or how to fix it.
Anyway, we have found a way to access to the published files within Visual Studio (by FTP, I guess):
We have updated files that don't need to be compiled (which sometimes does not seem to work either, by the way. Maybe because we are uploading to the wrong server? Maybe some cache stuff?).
Anyway, my question is about how to upload compiled files manually, I mean, by FTP:
May we just upload a full local folder with the compiled files to Azure?
Or maybe compiled files in local environment are different than compiled files to upload to Azure?
Thanks for the clarifications!
For compiled files, like they are all in the bin folder of your project, you need to upload the bin folder to azure via ftp.
I can confirm this behavior by using visual studio FTP deploy azure web app.
Currently I try to host webAPI to Microsoft Azure and it is showing me this error as below, but when I am running it on localhost, it is not showing this error.
Error in HelpPage_Default
According to your description, since it's working on your local side, I assumed that you could clean your solution and remove all files under your bin folders, then rebuild your solution. When deploying your web application via Visual Studio, check "Remove additional files at destination" under "Settings > File Publish Options" as follows to avoid something residue from older versions of your code.
Also, you could leverage KUDU to compare your deployed web application content with the local version. Delete all files under "D:\home\site\wwwroot" via KUDU, and re-deploy your web application.
We are a group of students trying to host our project website in a webhotel, using a test server environment, before we decide to publish it.
However we are having trouble correctly publishing it to this environemnt, and have not been able to get help from the host support.
This is the folder structure for the test environment:
https://puu.sh/sP8Dq/b022c83f34.png
This is the folder structure for our project in Visual Studio:
https://puu.sh/sP8Gb/24e85dfff6.png
When we use FTP to upload our project into the httpdocs folder, along with the web.config, the site remains in the default state.
This is how the ftp server looks like:
https://puu.sh/sP8PE/26e3e45f4a.png
This is a first for us, so any help in how to host our site would be appreciated.
first of all you should be sure that your host provides the necessary tools to host a asp.net mvc application you need to ask this from your host provider, tell them what version of MVC your application is made of, and if its possible to host it there, there are afew issues with lower versions of plesk.
as what you have to do so your website comes up :
you have to copy the whole mvc project into httpdocs folder to view it online.
You need to ensure you are copying your websites 'bin' folder. You may also need to ensure that the MVC assemblies are in it.
When you installed MVC on your local machine several assemblies are registered with the GAC. It may be that your host does not have all the required ASP.NET MVC assemblies installed; if not then you will see a configuration error.
As these assemblies are registered in the GAC, the bin folder will not contain them by default.
Make sure your project explicitly references the following DLLs and make sure the Copy Local property is true.
System.Web.Helpers
System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Deployment
System.Web.WebPages.Razor
Microsoft.Web.Infrastructure
Rebuild your project and check the bin folder. These files should now be present. Upload the contents of this folder to your host.
I developed a site in asp.net using C# as the language.
I have debugged it and no more errors can be found and can also view the page from a browser.
I would like to host this site and direct a client to it for demo purposes but am having a problem each time I publish my site. The publishing only does away with all my .aspx.cs files but I don't see any .exe file that I can install or send to my hosting provider.
I would like to know if this what I am experiencing is normal or there are settings I need to do in my visual studio 2013 ultimate edition for these tasks to be performed?
Kindly advise me on the way forward
ASP.NET applications (not "ASP.NET websites") are compiled into a .dll file in your bin folder, which is then deployed on to the server.
Your .aspx/.cshtml1 files reference compiled classes and types contained within this DLL, thus eliminating the need for source files.
There won't be any .exe files, you need to deploy your project to a web server, like IIS. Check out this link.
Bit of a strange question, but how do ClickOnce deployments work from a web site? I seem to be having some problems with this. Basically, the setup file will download when you click the "install" button, but then some files are missing.
Do you need to be on a Microsoft server to run ClickOnce deployments? I usually do deployments over a local server with UNC, and as this is the first time I've done one online I'm struggling a bit.
Any newbie tutorials you can point me to would be great, and if I do need a special host for it, could you please recommend some?
Thanks for all the answers everyone :)
Are you going to the setup.exe file or the .application file?
Deployment has to be pointed to the .application file. The ClickOnce file will then be launched directly there, no explicit "Save as" download. Once the manifest is loaded, the application will download what it needs and off it runs.
The first thing you need to do is determine if you want the user installing your app to run locally or launching it from the web only.
Second make sure you are using Internet Explorer to launch your application. The .application is registered in IE, but not other browsers.
I'd recommend server only. (At least to start) You don't have to worry about incremental updates. The user will get the correct version of your program every time.
There is nothing special going on with the server. It's all in the browser/.application.
It works from any file server, for example here is a ClickOnce deployment from an SVN server (i.e. I'm checking in the ClickOnce files after each publish): http://o2platform.googlecode.com/svn/O2_ClickOnce_Installers/O2_XRules_Database
Can you provide more details on what settings you have on the Publish tab of your project?
Regarding missing files, yes it can be a pain since ClickOnce doesn't auto add all dependent files from sub projects (I have found in the past that you need to include the extra (non dlls) files you need in the project you are deploying via ClickOnce)
No special hosting requirements are needed. You just need to make sure all the files required by the published clickonce app are deployed.
Take a look here :
http://msdn.microsoft.com/en-us/library/31kztyey%28VS.80%29.aspx
You can deploy to a webserver using either FTP or HTTP. You need to have the following MIME types set up in order to host the deployment:
.application --> application/x-ms-application
.manifest --> application/x-ms-manifest
.deploy --> application/octet stream
If you are deploying .Net 3.5 as a prerequisite, you need these as well:
.msp --> application/microsoftpatch
.msu --> application/microsoftupdate
If you have vsto apps, you need this one:
.vsto --> application/x-ms-vsto
Check out the Application Files dialog in the Publish tab to see what files are included. You can try running the exe file from your \bin\release folder, but if it's using something in the Global Assembly Cache (GAC), it will work and not tell you you're missing it.
Here are some other helpful links:
ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx
HowTo publish a clickonce app
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx
RobinDotNet
Visit my ClickOnce blog!