Deploying the Windows Form Application by Click Once - c#

I knew nothing about ClickOnce and I tried to find more. I have an Windows Forms Application and I want to use a web server (http) to deploy it by click once for testing by customer.
I have Apache in my system to use my system as a web server (which is in XAMPP software)
I have several questions:
When I want to publish the application, must I copy it in specific directory?
Is there any free web server that I can use?
If there is, must I copy my application on web server? How?
BTW, If you know a detailed instruction about that ,may you introduced?
PS: I read this reference completely.

You specify the location of your ClickOnce Application in Properties -> Publish. The Publishing Folder is the Location, where Visual Studio tries to save the published Location. If you are using a WebServer where you have to log in, Choose here a local path on your computer. The Installation Folder URL is the URL, where the ClickOnce Application is looking for Updates. This is the Url on the Server where you have to copy all the Files from the Publish Folder to, if its not the same.
I dont think that there is a free web server you can use. There are a few Services which are quit cheap but as you mentioned, you can use your own Server with XAMPP. I never used XAMPP so i cant help you their
Yes you have to copy your application to the Web Server. Im using WinSCP for that. Be sure to copy the files to the location you have set in the properties. If you are using XAMPP, you may copy the files locally to the XAMPP folder
There are no specific instructions i can mention. You will find everything in the Web. There are some useful articels at CodeProject

Related

How to make Visual Studio ASP.NET project ready to be hosted in a server.

I got an ASP.NET project. I'm going to send the project to a server company where they will host it. How do I prepare it to be hosted? I assume I cant simply send the whole project to them. What are the steps to prepare the project to be readable in their server?
This is my first project, never done it before.
Used Visual Studio 2015, WebForm/ASP.NET.
It's going to be hosted via a server company, no clue about anything about their servers.
Also got a MS Access database in App_Data folder within the project.
PS: I found "Publish" by right-clicking the project in Visual Studio's 'Solution Explorer'. I've been checking out this link but it's really confusing.
Any help would be greatly appreciated.
When you publish an application, most of the time it will run just as it does when you debug it, but on the server. All the binaries are copied there, with the Web.config, and most like all you have in your application, but the source code will not be avaiable of course. You don't need to send the application to the company which will host your application, most likely they will give you the server address where your application will be published, they will create an account for you, with some permissions, and credentials. And of course, you can read more about IIS server, it will be pretty relevant to you, and you can configure yourself a server where you can publish your application, just to see how it works.
Set up your own application on your own IIS and experiment locally until you have all stuff in place. Then copy to you hosting environment.
Later on you can script this process to have full control over what you need in dev and prod respectively.

Unable to find the runtime directory

In advance, apologies for any improperly used terminology... I'm fairly new to web development/hosting, and IIS
I am trying to host a 64 bit ASP.Net 5 (MVC 6) web application, which uses beta 7, via IIS 7.5 on a windows Server 2008 R2 Standard machine.
I am publishing from Visual Studio 2015 (on a Windows 8 laptop) to a shared folder on the server. My IIS web application's physical path is the wwwroot folder created in the publish directory and the website seems to attempt to launch correctly...
Whenever the site attempts to run, however, I receive an error which states the following:
Unable to find the runtime directory 'D:\www\mysite\wwwroot\..\approot\runtimes\dnx-clr-win-x64.1.0.0-beta7'
Possible causes:
The runtime was not packaged with the application
The packaged runtime architecture is different from the application pool architecture.
The frustrating part is that if I copy and paste the link IIS claims it can't find and paste it into Windows Explorer, it leads me to a directory which does exist. That rules out the first explanation. As far as the second explanation goes, I have checked my publishing profile in Visual Studio and ensured that it is indeed the 64bit version of beta 7.
As far as I can tell, the proper runtime is sent with the published files, and they are the correct versions.
Is there anything I'm missing? The application runs fine in Visual Studio 2015. I don't know why when running on IIS it can't find a folder which not only exists, but is readily available to be browsed to.
UPDATE: I've continued to fight with this problem and found some odd symptoms... I can successfully make a website application from just about anywhere other than the D:\www folder. I stuck my site's published files container directly into the D drive and made a site directly from that, and it launched without a hitch. I was also able to replicate this on the C drive, and even placed the published files container into a folder called "wwww" in the D drive (so its physical path was D:\wwww\MySite\wwwroot as opposed to D:\www\MySite\wwwroot).
Does anybody know why "www" is problematic in particular? The folder structure in place here has several other (albeit much older) websites running from the www folder, so it's ideal that this application is placed in the same area. It seems like it works everywhere but there, however.
Any help is much appreciated!
For what it's worth, the solution I went with was to not place the application's publish folder in the D:\www folder. I ended up simply creating another folder in the root of the D drive and pointing the web application in IIS to that.
One of possible causes might be insufficient permissions for IIS user.
I added permission for approot (runtime) folder for IIS_IUSRS to read. Looks like IIS user was unable to read and load content of this directory because of insufficient permissions. After that it worked fine.

How to Upload .Net Website to Hosting for it to work?

To learn more about .Net I created a website but now I want to learn how to Host it, in PHP I would just upload the files to the host and check everything how do I do this with a .Net website?
I have 2 Databases, Controllers, and Views.
I done some research and people said to just upload the files from the bin folder which I tried but it did not work, also tried just tried uploading the DLL files with no success.
Also tried uploading all the files from the project folder but it did not work.
Found a tutorial which right click the project and publish it so I tried publishing it to a folder and then uploading that but that did not work to.
To successfully publish and run your website on your host machine, the host machine must first have IIS (Microsoft's Internet Information Server) installed and running.
Once you have that in place there are several different approaches to deploy your website to the host. Here is a link to guidance from Microsoft's asp.net site in regards to "Choosing the Right Approach to Web Deployment".
Specifically, for you to be able to go "right click -> Publish" from within Visual Studio the relevant approach is "Web Deploy Handler (Publishing)" and you can find detailed instructions for setting it up in "Configuring a Web Server for Web Deploy Publishing (Web Deploy Handler)".
You just upload the files.
But you msut be sure that IIS is configured th acctually watch for a .NET app in the folder it loads in.
For normal we apps you did the right:
Also tried uploading all the files from the project folder but it did not work.
If it "just does not work" then it means .NET is just not there on that server or the folder you upload to is not configured to load a .NET project. Period. This is a fallback (technically you can upload less - the project file, i.e., is not needed), but it should work.

ClickOnce update with Apache server

I have been working on a C# application which needs bug fixes and updates once i deliver it to clients. I am currently trying clickOnce method of microsoft to provide updates.
For that i need to publish my application to server with frontpage server extension (If i am not wrong!). We are using windows server 2008 enabled machine, with Apache running, i googled regarding "Publish c sharp application on Apache server" and i found this workaround.
It edits .htaccess file to allow access to VS to publish application. But it doesn't seem working. I guess the page is out dated, written in 2006.
So my questions are:
How do i publish c sharp app on apache box?
How do we publish app? Using VS or any other method?
The manifest and payload (files) just need to be generated and then copied en masse to your server, it doesn't have to be a Windows machine.
Publish to a local folder/share and then replace the entire ClickOnce folder so that the code security values remain intact. I'd suggest you always rename your current folder and then copy your latest bits into a "new" folder that is your install location.
i managed to give updates with this workaround (i dont know how feasible is this! Need inputs!)
I used database to track version numbers and (link for) latest copy of software. Then i check for updates on startup. If new update is available it downloads exe (in app itself), closes app and run the setup.
I am using install-shield to generate setup. But when i run setup in machine which is already having older version of software, it doesn't update it, even though it displays its updating.
I know visual studio also provides option to create installation, but it isn't working either!

ASP.NET, steps to deploy a website

I have recently inherited an ASP.NET website to look after.
I have a copy of all the files but coming from a PHP background I am not sure how to make changes and deploy it.
After I make changes to the site I presume I need to compile it. But can I then simply copy the site onto the server or do I need to create a setup package and 'install' it over the top of the production system?
Also, where does the code-behind DLL 'sit' in the file system?
Is there a decent guide to this kind of stuff?
After making changes and testing them with your local copy (I'm assuming you know how to do that), click the "Copy Web Site" button at the top of the solution explorer. This lets you connect to a remote server (your production box, presumably) and will compare your local version of the web site to the one on the server, and flag any files that have been changed locally. You can then update the server version so that it matches your local version.
If you're deploying the web app as a compiled DLL (instead of as uncompiled CS files), the DLL should sit in the application's \bin folder. Even with a compiled DLL, you still need to deploy the ASPX files.
You don't have to go for a setup. The answers to your questions differ based on whether you are using a 'WebSite' or a 'Web Application Project'. Please answer to following and we can follow up after that;
Which version of .Net / ASP.Net you use? (1.1, 2.0 or newer)
When you open up the package in VS (Visual Studio) and right click on the top most group (solution explorer) do you see options like Build web Site, Publish Web Site?
As a long-shot just try to create an IIS web site pointed to the root of your files and see if anything comes up. If this works the work process will be;
1. Do a change
2. Compile
3. Hit the web site URL and see whether it reflects

Categories