0

I'm very new to IIS7 and somewhat new to C#. My project right now is to use C# and IIS7 to create an interactive website with various clickable items and features. The C# programs are written and working properly, however I honestly do not know much about IIS7 despite trying to research it for a good amount of time.

My question is, how do I integrate C# scripts into ISS7 so that the website can be hosted with said scripts running smoothly within it? In other words, how do I combine the powers of ISS7 and my C# code to make a website? What must I do within ISS7 to utilize my C# code?

I've already "created" my new site within IIS7 and given it the appropriate bindings. I'm just not sure where to go from here.

I realize this may be a broad question/answer, so pointing me to where information on this topic can be found would also be greatly appreciated. I've searched through the official IIS website without much luck. Thank you.

1
  • Wouldn't you need ASP.NET to do this? Commented Jun 21, 2013 at 23:14

1 Answer 1

2

It depends on what kind of code you want to run. The best start might be a straight forward web project, and not web services/web api.

Create a new web site project in visual studio, and hook it up with IIS in project properties-> web -> uncheck "Use IIS Express" and click "Create Virtual Directory". When you build the solution next time, it will be "deployed" to your local IIS.

Project properties

A virtual directory maps to a physical directory on a computer. The web application will be running on your machine. If you have IIS on a web server that is not your development machine, then you have to deploy your web application to this server. You might find this usefull: How to: Create IIS Virtual Directories in Visual Studio

The relationship between Visual Studio and IIS is that you can create virtual directories from Visual Studio. This means that when you visit localhost/MvcApplication1, IIS serves you the web application that is mapped in C:\Users\<Username>\Documents\Visual Studio 2012\Projects\MvcApplication1

Sign up to request clarification or add additional context in comments.

1 Comment

ah okay. I guess I'm still figuring out how Visual Studio and IIS7 interact with eachother. So when I'm creating the virtual directory, what exactly do I put in that field within "project properties->web" in relation to my ISS7 site? Thanks a ton for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.