A
A
andrian12014-12-05 10:21:08
IIS
andrian1, 2014-12-05 10:21:08

How to create a site on IIS through another application?

I am new to IIS and am currently doing a project to build websites. I added the "Microsoft.Web.Administration" library and made sure that it was copied on the server as well. Added to web.config:

<appSettings>
<add key="enableSimpleMembership" value="true" />...

 <system.web>
<identity impersonate="true"/>
<roleManager enabled="true" />...

The code:
ServerManager serverManager = new ServerManager();
Site mySite = serverManager.Sites.Add(websiteName, sitePath, 80);
mySite.ServerAutoStart = true;
serverManager.CommitChanges();

When I try to create a site, it redirects to the login page.
Three days I can not find a solution to the problem, please help me solve it.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Filatov, 2014-12-05
@NYMEZIDE

you already got everyone here with your application that creates sites. honestly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question