How to add https bindings to a website in iis7

by Mark 20. September 2011 10:34

We wanted for one of our web sites a binding like https://www.example.com but in iis7 manager I was not able to add a hostname for the https:

2011-09-20_101329

If this is completed it looks like this:

2011-09-20_101542

But I needed a real hostname. with some time searching the web I found a solution using the appcmd.

If I run a cmd with appcmd.exe or write a .cmd I was able to have my host binding with https.

appcmd.exe set site /site.name:”example.com" /+bindings.[protocol='https',bindinginformation='*:443:www.example.com’]

I added a second line for docs.example.com

and that’s what Iv got:

2011-09-20_103128

Of course I had to remove the empty hostname. So only www. + docs. were reachable thru https

my .cmd looked like this :

C:\Windows\System32\inetsrv\appcmd.exe set site /site.name:"example.com" /-bindings.[protocol='https',bindinginformation='*:443:'] /+bindings.[protocol='https',bindinginformation='*:443:www.example.com'] /+bindings.[protocol='https',bindinginformation='*:443:docs.example.com']

So I removed the standard binding an added my wanted ones.

2011-09-20_104217

But be aware that at this point there is no ssl certificate selected for this hostnames.

 

Best, Mark

Tags:

Administration

MSBuild does not build like Visual Studio 2010

by mark 7. September 2011 23:08

In most of our projects we use Continuous Integration (CIS) for test purposes and sometimes also for automated deployment to our web servers.

Recently, we had some problems with our new Todo Management project. During local development, we use Visual Studio 2010 for our projects to build. But our Team City continuous integration server (CIS) uses MSBuild to build our projects before we publish it.

After finishing the setup as usual for the Team City CIS, the automated deployment worked fine but the website threw the exception shown in this stack trace:

Server Error in '/' Application.

No constructors on type 'Teamaton.TodoCore.Repositories.TodoRepositoryJson' can be found with 'Public binding flags'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Autofac.Core.DependencyResolutionException: No constructors on type 'Teamaton.TodoCore.Repositories.TodoRepositoryJson' can be found with 'Public binding flags'.

[Remark: TodoRepositoryJson is an old implementation of ITodoRepository that has been replaced by a different implementation,TodoRepositoryDb, by now. The old impl is still part of the project but only used explicitly where needed.]

After using Publish on a local machine with VS2010 and a quick copy-paste deployment to the web server the website was running fine. To verify the problem outside the CIS, I built the project on my local machine also with MSBuild and copy’n’pasted the DLLs to the server. The website now showed the same error.

The problem seems to be that VS2010 and MSBuild generate different DLLs from the same source code.

Hope to find the source for that problem soon…

Tags:

Administration | Testing

About the author

The authors are the admins at teamaton.

Isn't everyone a little admin?

Month List

Page List