This relates specifically to the Windows Azure Accelerator for web roles.
How can I configure the Website manager web role so that it only responds on a certain host name and have one of the hosted sites used a wildcard binding?
So far I've given the web role a specific hostname and added a binding to my child site with an empty host name. Looking in IIS on the remote machine, everything looks fine.
However, I'm finding that the wildcard entry has little effect and I can only get to the web site if I set up specific bindings.
This is caused by the way in which Azure handles "wildcard" bindings. Specifically, a binding with IP "All Unassigned" doesn't actually work. I've yet to find out why - MS support are working on that one.
I've added the patch to fix the Accelerator on codeplex - http://waawebroles.codeplex.com/workitem/5
[Update]
Have blogged full details at http://ben.onfabrik.com/posts/azure-accelerator-wildcard-bindings
Simple, open ServiceDefinition.csdef and add hostheader to WebRole sites bindings. Result should look somewhat like this:
<Site name="Web">
<Bindings>
<Binding name="HttpIn" endpointName="HttpIn" hostHeader="webadmin.mytest.com" />
</Bindings>
</Site>
Unfortunately sites without defined header still wont work anywere else than on local machine (remote desktop) and will fail with:
Service Unavailable
HTTP Error 503. The service is unavailable.
Related
I setup a Sitecore infrastructure on azure (I created the same before and it worked) and when I connect to the web apps directly, they all work. I configured access to two of the apps via Application Gateway - while one works, the other one gives 502 on the health status.
I checked on the application and there it shows me that the error is "ERROR_INTERNET_CONNECTION_ABORTED".
When I completely deactivate Sitecore (rename default.aspx and web.config) and put an index.html page, the application gateway can access it.
As mentioned - I have a running deployment that I did with the same ARM template. I also deleted everything and redeployed - same issue.
As mentioned - direct access to the web app works perfectly.
I have NO network restrictions on the web app yet.
It might be the case for Sitecore initial startup to take ages (more than health probe from service gate).
Considering Service Gate does not receive response from WebApp, it assumes application to be unhealthy, and might cache the 502 code.
What does your web app diagnostics say?
I finally found the issue. It was not the startup time and not an issue with the Application Gateway:
<ipSecurity allowUnlisted="false" denyAction="AbortRequest">
<clear />
<add ipAddress="0.0.0.0" subnetMask="0.0.0.0" allowed="true" />
</ipSecurity>
this is in the web.config for newer Sitecore Versions. No idea why it worked for the other installation - but removing this solved the issue for me.
For now, i'm running a Unity Web Player App in a Windows Azure WebRole as suggested here.
Deploy Unity3D in Windows Azure
I'm a bit stuck with my unity app. I just deployed my application on windows azure. For the details, I have my web player file at siteroot/0/.unity3d
I use Uniweb to communicate with my web role (same as the one where the .unity3d file is located, so, it's the same domain)
But when I send HttpPost to my http://asp.net page I got this exception : SocketPolicyClient1: Incoming GetPolicyStreamForIP
SocketPolicyClient1: About to BeginConnect to x.x.x.x:843
SocketPolicyClient1: About to WaitOne
SocketPolicyClient1: WaitOne timed out. Duration: 3002.1718
SocketPolicyClient1: Caught exception: BeginConnect timed out
Exception: Unable to connect, as no valid crossdomain policy was found
But I have a crossdomain.xml located at siteroot/0/
xml version="1.0"
cross-domain-policy
allow-access-from domain="*" to-ports="1-65536"
cross-domain-policy
I don't know why my unity app don't communicate with my (same) http://asp.net webrole. It worked well when I built windows app but with web player it fails.
Thanks a lot !
Based on above log I am suspecting that you did not bind the port correctly when the role starts. To get is done you need the following:
Add the following endpoint to your Azure Application:
<Endpoints>
<InputEndpoint name="Unity3DPort843" protocol="tcp" port="843" />
</Endpoints>
After that in your Role OnStart() method you will need to do the following to start the listening on that port:
TcpListener Unity3DPortListener = new TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Unity3DPort843"].IPEndpoint);
Unity3DPortListener.Start();
I am only suggesting above based on the problem description so please try and let me know if it worked or not.
It's strange. It don't use Uniweb anymore but the build in www class and it still gives me the SecurityException: No valid crossdomain policy available to allow access.
I have my .unity3d in the blob storage (not same domain)
We're developing a new website running in azure. We are currently developing against the local azure dev environment. But now we need to publish and test the site in the real Azure world. But we would like to run in a "closed" environment, where only know users have access, as the site should not go live yet. Any suggestions to accomplish this?
/Rasmus
Windows Azure has something called 'staging mode', see this post: http://sevans.info/2010/10/10/windows-azure-staging-model/
It's very powerful, and exactly what you need as far as I can see.
You could remove the endpoints of your instance configuration, so there will be no forwarding through the load balancer. After that you could use the Remote Desktop to log into your azure instance and test your web application.
Above suggestions are great and I would also like to add two more in this list as well:
Using production deployment and having a dummy index/default page with directory browsing disabled (already set as default) So when someone come you your site there is nothing they will see. And as there is no directory browsing so they can not guess the page*.aspx to visit your site. This will keep your production site running and you can test it from outside.
Removing your instance form Load Balancer while keeping your instance healthy. This will require you to test the Azure Application by RDP to your instance and then launch internally. If you wish to do so here is the Powershell based trick.
You could restrict the IP addresses that are allowed to access your app if you have a static IP address. As per this link: https://azure.microsoft.com/en-us/blog/ip-and-domain-restrictions-for-windows-azure-web-sites/
Developers can use IP and Domain Restrictions to control the set of IP addresses, and address ranges, that are either allowed or denied access to their websites. With Windows Azure Web Sites developers can enable/disable the feature, as well as customize its behavior, using web.config files located in their website.
Here's the code:
<system.webServer>
<security>
<ipSecurity allowUnlisted="false" denyAction="NotFound">
<add allowed="true" ipAddress="123.456.0.0" subnetMask="255.255.0.0"/>
</ipSecurity>
</security>
</system.webServer>
I need to run a Web Role in azure compute emulator under domain name rather than localhost ip address (127.0.0.1). I can configure my project run regular web app on local IIS, so I can use actual domain name rather than development server ip addresses...
My application is very url specific because i use subdomains to define States (US States). For example, i need azure emulator to use something like:
http://wa.myapp.net, but not http://127.0.0.1 which doesn't make sense to me.
I have a lot of features that relay on sub-domains in my url. With regular web app I can configure this to run on IIS and set the url in my project (and bindings in IIS), but I don't see any way how I can do it in azure emulator.
Right now I have a work around. I just configured my local IIS to point to the application folder, I can run my app and then just attach my visual studio to iis process. But in this case some features don't work because azure role is not running... so it doesn't quite solve the problem...
Please, need an advice.
Thanks!
The MSDN article Configure a Web Role for Multiple Web Sites explains how to do this.
You can add extra bindings with a hostHeader attribute that specifies a custom domain in ServiceDefinition.csdef.
For example:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="MyService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0">
[...]
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="WebSvc" />
<Binding name="Endpoint1" endpointName="WebSvc" hostHeader="my.custom.domain.com" />
</Bindings>
</Site>
</Sites>
[...]
</WebRole>
</ServiceDefinition>
You still will need to setup the host override on your machine in C:\Windows\System32\drivers\etc\hosts, and navigate to the correct URL.
You cannot connect to the Dev Fabric from an external server. You can use fiddler on your server to redirect requests from another port to your azure fabric emulator. Hopefully, this is just for development, because it will not scale.
http://www.fiddler2.com/fiddler/help/reverseproxy.asp
Also a great tool to forward the request to your azure emulator: http://www.quantumg.net/portforward.php
I need help, I'm new to the WCF world having recently made the transition from SOAP Webservices.
The WCF service works well when I run in from the VS2008 ASP.NET Development Server i.e. Debug Mode. The problem comes when I try to access the service via IIS.
I've setup a website on my local IIS Webserver hosted on port 8082 (http://localhost:8082) and have created a VirtualDirectory (1.0) that points to the physical directory that contains my WCF Service code. The Website is setup to do ASP.NET 2.0.50727. I can get to the landing page and also an assortment of .aspx pages but when I try to access the Service.svc, the browser never gets there and just sits idling.
http://localhost:8082/1.0/Service.svc
My question is what setup am I missing to get the service to work from inside IIS since I already know it works under the development server.
I'm attaching part of my web.config if that would help.
<system.serviceModel>
<services>
<service name="Service1" behaviorConfiguration="Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
You talk about RESTful service, yet you're using the wsHttpBinding.... that's not the REST binding - that would be "webHttpBinding".
For the most part, WCF services ARE SOAP-based - any of the bindings except for the webHttpBinding are SOAP endpoints, so your wsHttpBinding endpoint is definitely not RESTful in any way, shape or form. You can communicate with it using e.g. SoapUI or better yet - the WcfTestClient in your Visual Studio folder.
You cannot however expect to get XML shaped data back from it by just browsing to that URL.
Marc
By default IIS 7.0 is not configured
for WCF services, we are going to
configure IIS 7.0 to run WCF services
i will break up the whole procedure in
steps.
http://basitblog.wordpress.com/2010/01/12/deploy-wcf-service-over-iis-7-0/