How can I programmatically create new sites in IIS 6? - iis-6

Currently whenever a new subdomain is created for the site, a new host header value needs to be added manually in IIS for it to work (needs to work with and without SSL). Is there a way to set host header value via API so that subdomains can be created without human intervention?

Check this blogpost: Creating a new website programmatically on IIS using ASP.NET and C#

For IIS 6, WMI will do the trick. Here's an example on Technet/MSDN:
Creating Sites and Virtual
Directories, and Setting Properties
Using WMI
http://msdn.microsoft.com/en-us/library/ms524913
-Oisin

Related

Host two asp.net core applications on the same Ip and port (localhost:8080 for example)

I have two projects which are ASP.NET CORE servers (1 BackEnd and 1 Identity Server)
I would like the BackEnd to serve both apps on the same port and keep two separately runable projects.
How can I make this possible ? The purpose is to open only one port to the client.
Thanks in advance
I have two projects which are ASP.NET CORE servers (1 BackEnd and 1 Identity Server) I would like the BackEnd to serve both apps on the same port and keep two separately runable projects.
If your App(s) are hosted on IIS, you can try to deploy your BackEnd service and Identity Server in two separate applications under same web site as below.
Please note that the application's path would become part of the site's URL if we create an application in IIS. To make your Apps can work well, you may need to modify some code to include application's path in URL while you configure Identity Server to protect your BackEnd service.
In IIS, you need to set a binding for each web application. Then each web application will respond to requests for the corresponding binding.

WebHost.CreateDefaultBuilder when hosting without IIS on Windows

I'm planning to host Asp.Net Core 2 application without IIS on Windows.
The default way to create web host seems to be using WebHost.CreateDefaultBuilder. But what is confusing me is that inside there is a call to the method UseIISIntegration.
Is it ok to use WebHost.CreateDefaultBuilder when hosting Asp.Net Core 2 app without IIS on Windows? Or other options are advisable?
Its absolutely fine to use WebHost.CreateDefaultBuilder
As when hosting with IIS it just work as proxy and redirect request to kestrel server.
It doesn't create much of problem.
Take a look at this article here

Can't see published ASP.NET MVC website

I published my finalized ASP.NET MVC 4 web application through FTP using Visual Studio 2012 publishing method. My webhost is Strato.de.
The problem is that when I try to access the website's domain, it says "This domain is now reserved, but no content was uploaded". I checked the ftp server using Filezilla, and all the published files are there. I really don't know why I can't see the website.
Here is a snapshot of the files from Filezilla:
http://i60.tinypic.com/zjxle1.jpg
That sounds like the "splash" page or default web site on your domain provider. Many providers like GoDaddy want you to also buy web hosting from them, so they initially set your DNS records to a temporary shared hosting-type account with a default website inside. Make sure your DNS records/namespace servers are set to your actual hosting provider.

HttpClient cant recoqnize the installed certificate for Https

I am developing a Windows phone 8 application in which i am using the nuget package to create some soap requests to a web service As far as "http" concerns everything runs properly, but in order to use https i need to use a custom certificate which when i installed on the windows phone device the IE could see the https website just fine.
So the question is:
Why my HttpClient inside the application doesnt recoqnize it and what do i need to do to access it?
Is that even possible?

Custom web.config for asp.net web part in sharepoint 2010

Base:
I have created a ASP.NET web part to be deployed to a Sharepoint 2010 site. This web part is using a external web service, a WCF service that is hosted else where, not on the same machine as the Sharepoint site. The web parts are installed on the sharepoint server using a CAB-file that is created via a deploy project.
Issue:
My issue is that I have web service binding configurations in the web.config of my ASP.NET web part solution that I need to modify based on what customer is using it, so I need to be able to modify my binding address after installation (or during).
Other:
I have seen solutions using the SPWebConfigModification, but I have no local installation of Sharepoint so that is not an option. I have also seen pure C# solution where the endpoint address is hard coded in the assembly, but this will prevent me from modifying the address after compilation of the web part. The best way would be to have an external txt/xml-file that I can use from my web part to get the endpoint address from, or a smart way of updating the sharepoint web.config not using SPWebConfigModification.
so...
any one have a awesome solution to my issue?
Can you use custom webpart properties that will contain the WCF endpoint information? This way you will be able to configure your webpart(s) after they are added to a page. The properties are reachable from the webpart code so you can generate the wcf proxy in the runtime with no custom config files in the solution.
this article might help you with the custom properties http://www.lamber.info/post/2010/05/21/How-do-I-create-custom-properties-in-Visual-Web-Parts.aspx
Editing web.config is almost always the wrong place to put something like this.
Maks answer is good and certainly the easiest option, if you want to store the address of the web service in one place to be used by multiple web part instances then this option may be better.
SO - What is a proper way to store site-level global variables in a SharePoint site?