How do I specify the location of IIS Express runtime for SharpDevelop? - iis-express

I don't have admin rights on my machine, so I can't install IIS Express with the wizard, so I have unpacked the installer into a folder.
I can edit the applicationhost.config manually and it runs exactly as I should, but how can I tell SharpDevelop (4.3) where it is?
When I switch to the Web tab on the project properties it tells me
Local IIS or IIS Express was not found.
and the only option I have is to Disable web server options.
Am I missing an option, or is there a (HKCU) registry setting I can tweak?
Ben

Unfortunately it is not currently configurable. Currently SharpDevelop looks for the IIS Express executable in program files.
You could try setting the project's properties so it uses IIS Express as a startup program. This can be configured if you select the Debug tab in the project properties.
Alternatively you could download the source code and edit the WebProjectService class to use the correct path.

Related

How can I host Office add-ins on localhost?

I'm new to web-servers. I have Internet Information Services (IIS) 10 Express installed on Windows 10. I'm trying to develop an Office add-in so as to host it in the same computer I use. The problem is how do I host the add-in in a local web server? Since I'm new would appreciate a little of step by step answer.
while you are developing the add-in, you do not need to worry about a local web server. The Visual Studio tools take care of all that for you (it will run in a web server provided by Visual Studio).
If you are using Visual Studio 2015 (the community edition is free and works fine with Office add-ins), you simply create a new 'office add-in' project and it will all be set up for you. It will create a 'web project' for you and it will use that web project when you run the application locally - you do not need to do anything to make that happen.
You may find that you have to install the Office tools for Visual Studio but if you go to File > New > Project > Visual C# > Office/SharePoint you'll get a link to download the tools if you do not already have them.
In terms of hosting it in the public domain, I like to use the Azure Web App service as you can very easily publish directly from Visual Studio or you can setup continuous integration with GitHub, VSO etc. Once you have it hosted in the public domain, you simply change the 'Source Location' in your office add-in manifest file to point at your public URL.
Well I figured it out.
Except it broke my VS Setup now (Resolved)--> See here Installing IIS broke Visual Studio Office Add In Project Localhost
To enable IIS I had to open "Programs and Features" and select "Internet Information Systems".
Then start --> IIS. Browse to default site and added binding for SSL/Port 44367 (Same as VS). I already had a SSL cert from previous configurations, selecting the Dev Cert worked fine.
I copied everything from \ExcelWebAddIn1\ExcelWebAddIn1Web\* to the webroot C:\inetpub\wwwroot and adjusted the following in manifest.
replace:
~remoteAppUrl
with
https://localhost:44367
I then sideloaded the manifest and it worked as expected.
Note that Martin Kearn's answer still applies, this isn't needed if you want to just use VS and it has better debugging, but I wanted to test and learn.
This was all to test/debug deployment, and I was able to do the same by just changing the localhost url to a simple nginx webserver w/ the contents of the above webroot.

How to debug ASP site without port number on VS 2012 Express

I'm trying to debug an ASP.NET 4.0 web site using Visual Studio Express 2012. I've configured the project settings to use the local IIS web server which was installed with VS. I need to use IIS so that urlrewritingnet will work.
I need to run the site locally without a port number. Currently it runs as http://localhost:4652/ which breaks some of the routines since they reference Request.Url.Host. This results in attempts to access resources using http://localhost/.
There is a lot of code to this site and it would be extremely easier and quicker (I think) to just configure my local debug to run on localhost instead of localhost:4652. Is there a way of doing this?
Since it's IIS Express installed with VS there is no configuration manager for IIS. When I click PROJECT -> mysite Properties and change the Project Url (under Use Local IIS Web Server) to http://localhost/ I get a warning that reads:
The local IIS Express URL http://localhost/ specified for Web project mysite has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?
When I click on Yes, I get another dialog box saying:
Unable to create the virtual directory http://localhost/
Does anyone know if this should or should not work and if it can work, how do I do it?
You can go to "user/documents/iisexpress/config" then open applicationhost with notepad or other relevant editor then go find "bindings" then change the value of bindingInformation into "*:80:localhost". Done
Its really simple. You need to attach the IIS process to the visual studio and browse the website.
Below article guides to achieve this.
http://www.codeproject.com/Articles/37182/Debug-your-ASP-NET-Application-while-Hosted-on-IIS
Its always a good practice to do a unit test of web apps to local iis while developing.

Visual Studio 2010 change from localhost to full computer name/domain

I am using Visual Studio 2010 and I would like change debugging environment from the localhost to my full computer name/domain. Does anyone have some step by step instructions on how to do this? (I would also like to set it up as the default for all new projects plus how to change it in existing projects). I am new to using visual studio and programming in general.
I found this post Visual Studio 2010 - Change localhost to custom domain in the forum but it wasn't clear to me on how to make the change. I went to the project properties web tab and attempted to set up local IIS Web server but got the following error:
"ASP.NET 4.0 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.0 in order for your site to run correctly."
I am not ever sure if that was the correct way of going about doing this. I just need my debug url address to go from:
"http://localhost:53674/Projectname.aspx"
to:
"http://computername.pag-domain.webname.org/Projectname.aspx"
Thanks!
For fixing the iis web server, I am not really sure what was done...our IT department worked on that. For setting up the local IIS webserver in visual studio I did the following: In the web project properties, under the web tab, I choose "Use Local IIS Web server, in the project URL, I put the full computer domain and told it to create a virtual directory.
Got it. Our IT came to the rescue — he fixed some issues with the ASP.NET not accessing 4.0 correctly. Then I set up the "Use Local IIS Web server" correctly and it worked like a charm.

IIS Express on a shared development machine (rdp)

I have a problem which I thought could be common, searched the web for it but found nothing.
We're using a shared development machine, and every developer connects through RDP and has his own profile, desktop, etc.
The problem I am encountering is with IIS express. Since it is configured at user level (applicationhost.config inside documents/iisexpress/config) and the port configured must match the one declared in the .csproj file, two developers can't possibily run on the same port, as it gives the error "the port is already in use".
So to make it work we have to manually change the port both on the csproj and in the applicationhost.config for every developer, but it's only a temporary fix as when we commit our changes to SVN, the csproj file gets merged, so we have to do this process every time someone commits/updates.
My question is: is there a clean way to use IIS express with Visual Studio 2010 on a shared development machine?
Thanks.
Partially tested answer. Not sure how it'll work on a multi-user workstation. It might give you, or someone else here, a jumpstart to a proper solution that works best in your existing environment.
It appears that Visual Studio stores all the web configuration in the csproj/vbproj and IISExpress stores its configuration in %userprofile%\Documents\IISExpress\config\ApplicationHost.Config.
Normally, we store the csproj files in source control, but ignore the csproj.user file so that each person may have some unique settings, such as the web configuration.
Each user who signs into the box must have their own profile.
Each profile must have their own copy of the source code.
Each user's copy of the source will contain their own csproj.user file.
Ignore .**proj.user* files in your source control.
Copy the web settings into the csproj.user by unchecking the option Apply server settings to all users and then commit to source control.
Each user who pulls a copy of the source will have to configure their web settings, use a unique port that the others users are not using, and uncheck the box above so that their configuration is not passed on to the other users.
Doing this, Each profile will have their own IIS Express ApplicationHost.Config configured with a port that is different from the other profiles. Each user's copy of the source will have a csproj.user that is configured with the same port in their profile's IIS Express configuration.
For reference:
I've tried changing IIS Express's ApplicationHost.Config to use a different port than what Visual Studio expects and Visual Studio is unable to connect the debugger to IIS Express.
How IIS Express's configuration works: http://msdn.microsoft.com/en-us/library/ms178109.aspx
The best option you can use is to take advantage of the Import functionality built into MSBuild.
Essentially, you would create a seperate build target for each user. You can then import this target from this referenced file directly. I would then recommend creating this file on the server (for each user), but leaving it outside of source control.
This should allow each user to have a custom IIS port without conflicting with others.
I think you can create subdomains for each user and implement the required changes and do the testing. In this way each user can his own subdomain and port and hence work independently on the shared IIS Express.
You probably won't like my answer but here's my thoughts:
As you noticed, the configurations are tied to the user profile and not the server; this is because IIS Express is not intended to be used as a shared development server. You should be using full IIS.
I do not see any benefit or reason to use the same physical box for development. Admittedly, I don't know all the details of your scenario with licensing or workstation resources, but it doesn't seem like you gain much from having everyone RDP into the box to use Visual Studio - each person still needs a license, performance will be slower, and you shouldn't be working on the same project instance.
You should seriously consider your entire setup for development:
Each developer should use Visual Studio on their workstation, and debug/test there using IIS Express (configured with the same ports and settings across all machines - very easy).
From there, your developers should check their code into source control, and examine conflicts that may or may not arise. I'm not sure about SVN but the MSBuild automation available in TFS can be use to setup a continuous build policy that deploys to a common IIS installation so that your merged code is tested and usable from the full IIS installation mentioned above.
Anything else would be a workaround/hack that will bite you in the butt later.

VS 2008 Express - clickOnce question

I have the VS Express 2008 where there is only ClickOnce deployment option. I need my app to be simple ran by clicking on the exe file without any installation.
I have found out that after deleting both manifests and icon /which is always in the output directory even though its embedd with "Do not copy" option/ it works well. Is it ok or is there any cleaner way how to do that? I mean, if the app is not being installed but only ran, do I still need external manifest files? I tried to embedd them but these still persist external (tried "Embed manifest with default setting" option or add my own and selected from list).
EDIT: In the Express, there is only ClickOnce.
Thanks
If you want to run it from the exe, ClickOnce isn't quite right. ClickOnce executes as a .application, and you should be able to just click the radio button (on the "Publish" tab) for "The application is available online only", which avoids any local ClickOnce install.
Otherwise, just build as Release and take the /bin/Release output; this is your standalone exe app. To get the right trust, a .NET exe can be executed from:
local drives
mapped network drives (f: etc) with the right .NET service pack
anywhere if "caspol" has been used to set a policy
I believe in Visual Studio Express, ClickOnce deployment is your only choice.

Resources