I have an application that works fine in my computer locally. What I need is to run this application in another computer but it doesnt have Visual Studio.
I installed IIS 7.0 and tried to create a virtual directory but no luck. Am using the right port? Used port 80 and tried port 4444 and no luck. Any ideas?
What files do I have to drag into the inetpub/wwwroot? All my project files?
You don't need Visual Studio for a web application (aspx). You need to copy the files from the Bin folder and setup a Virtual directory (you do need IIS and might need to enable some features in IIS to support ASPX) .
The easiest way to do this is from Visual Studio right click your project and click Publish. This will let you select what kind of publish option you want (File System will publish to a local dir and you can just copy to the new computer and hook to the virtual directory you created, Web Deploy let's you remotely publish from your local dev box, etc.)
Here is a walkthrough
As long as you're accessing the ASPX files through an IIS web server with the correct target framework you used then it can easily work without Visual Studio.
For instance, my production servers don't have Visual Studio on them. They just need IIS and the proper .NET framework installed.
As a commenter mentioned above, if you right click on your project and select PUBLISH you'll be in good hands.
Go to IIS Manager
Open sites
Right click on default website and choose "Add Application"
Alias "Application Name 'can be any' " and Physical Path is the application path
Related
I created a web service in C#, using Visual Studio 2010 ( Framework .NET 3.5). In debug mode it works great, but now I must publish it on the internet, so that I can consume it in remote (the app that will consume the web service is an android app).
So the question is: how do I publish my web service on Internet so that I can consume it in remote?
Thanks in advance; this is a work for taking my degree!
A simple way: you switch to release mode, update your web.config for production, right click on your service project and from the menu select publish. Then you publish it to the local folder. This way it copies only the files needed. Then you copy the contents of the folder to your remote site using ftp, for example, your hosting provider should have given you the credentials.
for some hosters it is also possible to publish directly but I don't use this.
I emulate Windows 8 on a VM using Parallels. I store all of my developer projects on my Mac's partition for simplicity and coherence.
When I try to build an app (Visual Studio 2012) running off this network share, I get the following compile-time error:
Error 1 Error : DEP0700 : Registration of the app failed. Rejecting a request to register from file:///Z:/Users/MY_USER_NAME/Sites/App1/App1/bin/Debug/AppX/AppxManifest.xml because the files are on a network share. Copy the files to the local computer before registering the package. (0x80073cf9) App1
Does anyone know how to solve this issue? I need to tell Visual Studio 2012 that my network share is a trusted device, or at least dupe it into thinking the project is in a local drive. Is there anyway to create symbolic links in Windows?
In Visual Studio 2010, I solved this issue as outlined on this website: http://www.sehajpal.com/index.php/2010/10/how-to-solve-loadfromremotesources-error-in-vs-2010/
Thanks for the help!
This post by Gearard Boland solves this issue. Hopefully this comes in handy for anyone else developing over a network share:
Yes, it's by design that you cannot run a Metro app from a network drive and deployment from Visual Studio essentially registers the app with the system without actually packaging and installing it (so it doesn't get put into the normal install location, which is local).
You can still work with sources on a network drive, but you'll have to override the deployment location, which by default is under the project's root directory (e.g. bin\). You have several options:
You can switch from local debugging to remote debugging and set the machine name as 'localhost'. This will do a remote deployment on your local machine (thus not using the project's directory). You don't need to install the Remote Debugger tools, nor start msvsmon for this to work on localhost.
You can override the project's output directory. Right-click on the project and change the output directory to something like: $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.
If you still want normal output to live next to the sources, e.g. when you build the appx package, etc., you can override only the layout directory instead of the entire output path. For this you'll need to modify your project file directly (e.g. *.jsproj, *.csproj, ...) to add the new value:
<PropertyGroup>
<LayoutDir>C:\WorkingFolder\$(MSBuildProjectName)\$(Configuration)</LayoutDir>
</PropertyGroup>
Hope that helps.
When deploying a ClickOnce application, the installation folder URL, is there a way to make it relative to the web application directory hosting it?
For instance, for local testing I publish to http://localhost:54592. However, when this web application is deployed, it could be anything from http://www.foo.com to http://www.foo.com/MyVirtualDirectory
I would like the path to find the installer in its current location, and the application after installer has completed to reference the web app host, not the development URL.
Platform: Visual Studio 2010, .NET 4.0, and C#.
This works out of the box if you stick with *.application as your application source. You just need to pick a folder inside your web application to publish your ClickOnce application, and the application is available from this address under your application.
For example, if copy your site to C:\inetpub\wwwroot\mysite and copy the ClickOnce to C:\inetpub\wwwroot\mysite\myapp with MyClickOnce.application inside the ClickOnce folder.
Then you expose your website as http://example.com and the ClickOnce application is available under http://example.com/myapp/MyClickOnce.application.
In case of setup.exe you need to recreate the manifest after you publish it to the destination location. This is done with mage.exe.
In the Options dialog, the Manifests tab, you can check the box that says "Exclude deployment provider URL".
Then provide the URL to your user for the installation based on where you put it. When they run it, it will create and save the URL where they got it from, and always look there for updates.
I have an asp.net application that i am modifying. I setup visual studio 2010 to publish to are development server which is running windows server 2008 RC 2 (dont think it matters). I added a new webform to the application through visual studios "add new item" feature and it works on my local computer. When i publish to the server, it starts to throw cryptographic exceptions because its trying to access a .p12 file in order to send apple push notifications to an iphone device. I thought it was something wrong with the certificate at first so i added print statements to the code and noticed it is trying to access the new page at the file path on my local machine instead of the file path on the server. Does anyone have any ideas on why its doing that? Is there a way to make the file path relative to the project?
You have to use MapPath("{relativePath/FileName}") . This will return a physical path.
filename = MapPath("/images/logo.jpg")
Would something along the lines of "C:\inetpub\webroot\images\logo.jpg"
Server does not matter. The file was added with an absolute path. Not sure why and don't have the time to research.
How is the site set up on your debug machine? Are you using IIS or the ASP.NET development server? Not sure if this makes a big deal, but switching to IIS and better mimicking production often solves these little snit type of errors. To switch, add the folder to IIS, then remove the project and re-include with the HTTP path instead of the project folder.
If local IIS is not an option, or you already have done that, I would do a search for the path in question and alter it there. If you find no results, this could we be embedded in the solution file some how.
We are developing C# 4.0 windows based application using visual studio 2010. Now we want to make an installable version of the exe using clickonce to deploy our application. I am new to .NET platform. So, please give me a step by step procedure to use clickonce to deploy my application.
While following steps :What should i need to given in Installation Folder URL Box(2 nd text Box):
Here is the break down of the two paths in this wizard
Publish Folder - Where should the Publish process put the ClickOnce deployment package
Installation Folder - Where will users of the application go to install the application from
Often times these are the same location. For example when I deploy ClickOnce applications internally I publish to a network share. This is the same place where users go to install the application.
One scenario where they would be different is when the users install from a web location. In that scenario you'd often have a publish folder which was a network share or path on the local computer while the installation folder was a web site URL