IIS deployment on non-server (consumer) Window versions is advisable? - iis

We have a WCF Service that we either have to host in a Windows Service or IIS. This is a commercial application that will be installed on consumer pc's running for example Win7 Home.
In my opinion IIS on Win7 is by Microsoft only meant for development and/or testing. Activating IIS on a consumer pc shouldn't be a real option.
So my question is: Is it a real option to host a WCF service in IIS in a commercial application on a simple consumer pc?

Related

Hardware reader utility works under IIS Express but not IIS

I'm developing an ASP.NET Web API (2.2) Intranet service at work that encapsulates access to a smart card reader for generating public key signatures. The smart card reader relies on an open-source command line utility (pkcs15-crypt) to perform hardware access and I have no problem getting the service to work while debugging in VS2013 and IIS Express. When I run it on regular IIS, though, the command line utility reports that it cannot find any smart card readers.
I've tried a few different identities for my app pool (including my own domain login) but so far no success. It behaves the same way on both IIS 7.5 on a Windows 7 box and IIS 8 on a Windows 8 machine (64-bit in both cases).
What else might I be missing here? What might be different about IIS Express that lets the utility see the hardware, whereas it isn't working in the context of full-blown IIS?
I experimented with various identities for my IIS app pool, and the ones that worked were
LocalService
LocalSystem
Identities that didn't work were:
NetworkService
ApplicationPoolIdentity
My own domain account

Windows azure web role on local IIS

I am developing windows azure web role. Can I host the azure web role on my local IIS.
If yes..what are the steps I need to follow ?
Local Machine is currently running on windows server 2008 R2
There are two ways to achieve that, with varying levels of fidelity to the target environment.
The simplest is just to run your website project locally. You can attach it as a virtual directory on IIS and run it from the browser or debug it from Visual Studio. This will run as a regular IIS web application, but it won't be running as a web role.
The second is to package your application as a cloud service and run it under the Windows Azure Compute Emulator installed on your development machine. There are several tutorials on how to do that, including:
Developing and Deploying Windows Azure Cloud Services Using Visual Studio - see "Debugging a Windows Azure Application Locally".
Run a Windows Azure Application in the Compute Emulator
Windows Azure Basics–Compute Emulator
Building the web role for the Windows Azure Email Service application - 3 of 5
How-to deploy application to Windows Azure Compute Emulator with CSRUN
The Compute Emulator simulates several features of Windows Azure Cloud Services, but yout have to be aware of Differences Between the Compute Emulator and Windows Azure. Your application can tweak its behavior according to the environment by reading the RoleEnvironment.IsAvailable and RoleEnvironment.IsEmulated properties.
The Compute Emulator uses IIS Express locally for your dev/test work. IIS Express should be already set up for you when you installed the SDK+Tools. (Older versions of the SDK relied on full IIS 7 - more info here).
If you're talking about developing for running in production locally: It doesn't exactly work this way. A web role translates to a Windows Server virtual machine with some startup scaffolding code to allow you to install things in your VM, tweak the registry, etc. Since web role instances are stateless, every time a new instance is launched, the startup script is executed (same if an instance crashes due to hardware failure and is brought up again on another machine).
If you want to run the web app itself locally, then you'd need to take specific actions, based on whether your code is executing in Windows Azure or on a local machine (and then package it a bit differently - you wouldn't include the web role project). You can check RoleEnvironment.IsAvailable + RoleEnvironment.IsEmulated to help you out.

Test Win8 App hosted in Azure Compute Emulator on Tablet

I have a two web application in Visual Studio 2012 running in the Windows Azure Compute Emulator (using IIS Web Service, not Express). Additionally I have a Windows 8 App in another Visual Studio instance which uses both azure web applications. This combination works fine on the same machine.
For presentation purposes I'd like to run the app on a Windows RT Tablet. Therefore I use the remote debugging tool to run the app on the tablet. Running the app is not the problem. But I didn't found a possibility to connect to the web applications from the tablet. The azure Emulator generates URLs like 127.0.0.X:81 but the tablet cannot resolve this address.
Is there a workaround to solve my problem? A way to run the azure application with the IP address of my dev machine? Or is it possible to create a kind of a proxy running on the dev machine which forwards requests from the tablet to the azure application?
I've seen a possible solution running fiddler as a reverse proxy. This does not work for me because fiddler seems to listen only on one port. But I need two.
Another possibility would be to configure the Azure Emulator endpoint.
Take a look at this SO answer for more information.

Best options to host my asmx web service on machine not having IIS

We have a requirement where we need to have some web services running on a server machine but it does not have IIS available. I came across this article on running asmx without IIS and many other sites/blogs have mentioned this article as well.
http://msdn.microsoft.com/en-us/magazine/cc163879.aspx
Could somebody offer alternatives to above to run asmx web services without IIS installed?
Other option i could find was Cassini - http://ultidev.com/products/cassini/
Windows Azure! That is precisely what it was designed for... it’s cheap and reliable!

ApplicationPoolIdentity cannot access network resources

My Setup: W2K8-R2 IIS7.5 x64bit servers (app pool is running in 32bit, though)
We have a (.net 4.0) web application that runs under the "ApplicationPoolIdentity". It has "Windows Authentication" enabled. The web app calls a web service on different (older - W2K3 II6) web server (same domain). The web service requires Windows Authentication as well.
On some of our web servers, this works well and I can see that the Web App calls the web service and identifies itself as the machine name for the web server it is running on (as expected). However on other web servers the application will not identify itself when it calls the web service and thus gets a 403 error (this is confirmed by looking at the IIS logs for the web service).
I've compared the web servers that work versus those that don't and I can't find any significant differences. (I compared the ApplicationHost.Config files from both sites and with the exception of a few encryption keys they are identical).
Any thoughts on what could be causing the App Pool Identity on the bad machines to forgo identifying itself? Did we set something up on one web server and miss it on the other?
If not, can someone recommend tools that could be used to track down what's going on?
Thanks for any help.
For anyone else who find this question, it is answered is several places :
Granting write permissions to a networked UNC folder for ASP.NET under IIS 7.5 and Windows Server 2008 R2
IIS application using application pool identity loses primary token?
DirectoryServicesCOMException 80072020 From IIS 7.5 Site Running Under ApplicationPoolIdentity
ApplicationPoolIdentity cannot access network resources
https://serverfault.com/questions/217547/applicationpoolidentity-iis-7-5-to-sql-server-2008-r2-not-working
Summary: Install MS HotFix KB2545850 and learn the details about this bug in KB2672809 which also shows how to reproduce this issue.
An update in case anyone runs into this... We realized that the common thread between servers that worked was that they had been rebooted recently. After rebooting the problem servers, they too started working.
At this point I can't explain what the issue was, but it appears a reboot solved it. I will update if the problem reoccurs.

Resources