In IIS7 using UrlRewrite module I want to do something likes this. I tried everywhere, possibly this is wellknown problem, but couldn't find any usefull solution.Url "http://tom.mydomain.com" should be read internally as "http://mydomain.com/dashboard?g=tom"I am using ASP.NET MVC, just in case info is required.
I have a working website with multi language support. Now this multilanguage support its based on three flags (one for spanish, another for english and another for french) and cookies. I stablish a cookie with the current culture. Then I have resource files for each language (default.aspx.resx, default.aspx.en.aspx, default.aspx.fr.resx ...)All working ok.Now I want to change the language system to subdomains. I want es.mydomain.com, en.mydomain.com and fr.mydomain.com, because search engines dont index very well with cookie language system.
I have created three A ZONES (es, en, fr) in the DNS hosting provider. This A ZONES points to the same IP that the WWW ZONE. Even though www.mydomain.com takes the user to the default.aspx of the website, but the other zones not.en.mydomain.com, fr.mydomain.com and es.mydomain.com returns a webpage with the text: BAD REQUEST (INVALID HOSTNAME)I think I have to make some other change in my code (perhaps global.asax).I have done this in PHP web server, but I dont know how to do in a ASP.NET server.I have searched solutions, but I have a lot of confusing information, principally about DNS, but I think that this part its OK
I find myself in a difficult situation. We're working on an ASP.NET MVC 2 application which is comprised of multiple sections. It is a design goal to have these sections span across several subdomains. Each subdomain will have its own controller.
The challenge is that our hosting provider's control panel allows two forms of redirection for subdomains, and neither of them seem to fit the bill. The choices are:
Redirecting to URL. Choice is given whether to redirect to an exact destination or a destination relative to the request URL. Redirecting to a specific folder in my hosting space.
I'll try to illustrate the intended behaviour. Assuming the default route is {controller}/{action}/{id}, I'd like the URL http://subdomain.welcome.com/a/b be handled by the MVC Application like http://welcome.com/subdomain/a/b.
The URL redirection could solve this problem, except for the fact that the user sees a URL change occur in the browser. We don't want the client to see the redirection occur.
Redirecting to our MVC apps root folder doesn't work at all. The app doesn't pick up the request and a 4xx error gets passed back by IIS.
edit:
In the interest of finding an answer, I'll simplify this a bit. The "redirect to URL" doesn't do what I want so that leaves redirecting to a folder.
If I'm redirecting a subdomain to the root folder of my MVC App and IIS wont pick up the requests, is this a limitation of IIS or my provider?
I have setup my website (ASP.NET 3.5) with AJAX, running with no problems at all.
When I test my website locally and on my main top level domain, there are no problems.
When I'm on a subdomain page, AJAX client side framework fails to load. I observed the problem deeply and found that whenever I'm on a subdomain page, WebResource.axd DOES load but ScriptResource.axd DOESN'T load (returns 404 Not Found error). I think I should modify some entries at web.config file, but I have no idea on what to do?
I am running into a unique problem (not easily googleable). This is what I am trying to do:Will be using subdomains: x.abc.com, y.abc.com, z.abc.com, etc.There will be single website hosted at abc.comBased on the subdomain passed (x,y,z,etc.), I need to switch databases and web.configs (appsettings, authentication, authorization info)For ex: If a user goes to x.abc.com, the site will select appropriate db & config settings and forward user to abc.com with db & settings cached/saved for the user session.Is it possible to have one hosted site and multiple subdomains that select appropriate config settings? Reason I need to do this is because credit card processor needs static url for requests and responses.
We have two subdomains for the same site, we would like that depending on the visited subdomain the initial page varies. But in IIS the default document setting is based on the web.config so...We know that we could use the http:/subdomain/page.aspx but its a requirement that we use only http:/subdomain in the links
Desired example: Click in link http:/subdomain1.web.com --> http:/subdomain1.web.com/page1.aspx (our_website/page1.aspx) Click in link http:/subdomain2.web.com --> http:/subdomain2.web.com/page2.aspx (our_website/page2.aspx)
I'm writing a SaaS app in C#/ASP.NET, hosted with IIS7. I want to create a personalized subdomain for every customer that signs up, i.e. fred.mydomain.com, bob.mydomain.com, each of which will point to the same app, just with a different skin per customer.
How do I create these subdomains programmatically?
I would like to create subdomains Dynamically under my domain using asp.net ,C#? I can not find good solution for this. What are the things i should do to complete this.
Scenario:
1.user register with site
2.domain name should be: http://username.domain.com
I want to deploy multiple asp.net applications on same hosting with subdomains. How it should be manged ?
I just created a subdomain and deploy application in its folder; when I tried to access application with subdomain it shows the following error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Consider that I want to create 10 websites in IIS, each of them pointing to the same website on local hard drive, each one running the same code, but on different subdomain.subdomain1.domain.com, subdomain2.domain.com, ..., subdomain10.domain.comHow can I add multiple connection strings in my web.config file and bind each connection string to a different subdomain ?I want to do this because every website will have a different database with different data.
I am planning to have 2 subdmains on my IIS server. Example - [URL]. So if someone logs on Portal and if we clicks on the App link, he should be successfully logged into App.
SO basically 1 signin for both subdomains. How to achieve it in ASP.Net 4, C#, VS.Net 2013?
I have an application running ASP.NET. I have different domains and different sub-domains. I want the domains to share session with their sub domains.
For Example, the following domains access this application:
[URL]
If a user goes to www.example1.com and print.example1.com, I want it to use the same session. If the user were to go to www.example2.com and print.example2.com, I would want it to use a different session than the *.example1.com.
The way I used to handle it was a hack in page_load that works perfectly in IIS6:
(SiteUtility.GetCookieDomain would return .example1.com or .example2.com depending on the url of the request) Unfortunately, this no longer seems to work for iis7. Each subdomain/domain a user goes to, the user gets a new session cookie.
I then found the web.config entry: '<httpCookies domain=".example1.com" />. This works great for sharing session cookie between example1.com subdomains. Unfortunately, this completely screws up session state for *.example2.com.
I want to deploy multiple asp.net applications on same hosting with subdomains. How it should be manged ?
I just created a subdomain and deploy application in its folder; when I tried to access application with subdomain it shows the following error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
I have several ASP.NET sites, hosted on the same domain (different subdomains) and working via HTTPS. I have WCF service, hosted on the same domain. I have a separate state server for sessions.
All sites use cookieless session (if someone asks why - i will reply later, but it's a 'must')
On my sites, I use grid components from Telerik (but actually it does not matter) that ask for data from WCF service and must be filled with this data.
The problems are:
1) I cannot manage to make POST request to WCF service from javascript: for some reason it's always either GET or OPTIONS (no matter if I use Sys.Net.WebServiceProxy invoke or just a plain jquery AJAX request). It happens even if I indicate COOKIE mode, not cookieless. Maybe because of this I am getting "405 Method not allowed" error - WCF is set for POST request, but the site sends GET...
2) I cannot manage to retrieve SESSION from my websites! I tried approach, that I found, but WCF always uses OWN session, instead of 'connecting' to existing ASP.NET session, despite on ASP.NET compatibility mode. I need SESSION to exchange data between my sites and WCF service
3) I don't have idea currently, how to manage security when exchanging data between mentioned ones, in the light of above-mentioned problems...
4) I don't know exactly, how web.config for WCF service should look like in my case, because I've seen tons of different variants, but all for some simple cases.
Would be really appreciated for the help! I'm stuck for 2 or 3 weeks already, far behind the plan, but nothing still works... I can see there are some pieces of info about similar problems, but I'm afraid to miss some small thing - in web.config or method attribute or IIS setting, etc - and f... up everything.