Web Development - Add Subdomain To Asp Website?
Feb 9, 2011I have an asp.net website. I want to add subdomain for a secondary language:
[URL]= main
[URL]= chinese
I have no idea where to start.
I have an asp.net website. I want to add subdomain for a secondary language:
[URL]= main
[URL]= chinese
I have no idea where to start.
Currently whenever a user uploads a file through our website, it gets put in a folder such as:
www.domain.com/Uploads/Docs/filename.doc
However, I'd like to move this to a subdomain such as:
uploads.domain.com/Docs/filename.doc
This is mainly because I'd like to keep the files uploaded by the user, totally seperate from the web app.
However, currently I use an ASP.NET FileUpload control to upload the files, by doing something like:
myFileUpload.SaveAs(Server.MapPath("/Uploads/Docs/filename.doc"))
How would I change this line of code to be able to upload to the subdomain easily?
folders in my website root are
a
b
c
I have subdomain "s1" which points to "a" folder. I want to know how could I access to files stored in "b" folder form subdomain "s1". My issue is that files I have some html content which saved in DB Records and their path are base on webroot i.e. "<img src="/b/movie1.avi" /> .Could any one tell me how I could show these files via subdomain "s1"
What I want to do is take traffic that is going to shop.mywebsite.com and redirect or rewrite (I'm not sure of the terminology) the domain to be www.mywebsite.com/shop. Both shop.* and www.* are separate web applications (nopCommerce and Umbraco respectively) that don't seem to cooperate when I've tried to nest them. Both applications are in a Server 2008 R2/IIS 7.5 environment.
I've searched around stackoverflow and what I've found is a lot of answers to mapping the other direction (ie subfolder to a subdomain) but that's not what I'm looking for as far as I understand the problem.
The end goal is to combine the SEO reputation of the shop subdomain into the www subdomain. I readily admit that I might have this all backwards and am willing to try any suggestions I'm offered.
I have an app with multiple subdomains, subone.parent.com, subtwo.parent.com.
I have a logon page at parent.com/login. When a user logs in I redirect them to the proper domain based on which one they are a member of. This works fine.
FormsAuthenticationTicket ticket = new FormsAuth...
string encTicket = FormsAuthentication.Encrypt(ticket);
var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, encTicket);
cookie.Domain = subone.parent.com
Repsonse.Cookies.Add(cookie)
This properly authenticates the user for subone.parent.com and not subtwo.parent.com. However I would like to do the following.
If the user goes back to parent.com, I would like to know that they are logged in and redirect them back to subone.parent.com.
Is there a best practice for accomplishing this? Or do I have to set another cookie for parent.com?
I'm working in asp.net mvc if it matters.
if i have a separate dll for each page on my server and that is working fine. if I make some changes in code behind file of a particular page say, xyz.aspx page. then I have to upload the dll of that particular page. and that refreshes the whole web application and all sessions and other values got disturbed in the application. Is there any way that uploading the xyz.dll (of page xyz.apsx) on refreshes the xyz.aspx and didn't disturb the whole web application.
View 1 RepliesASP.NET, web form model.Is there any sample code/site that demonstrate a couple samples for regular website patterns/ templates? Like if I want to use tab to switch between different pages, should I put the code in a single page or in different page, and treat each tab as a page.Or if in a search page (just a single search bar and button), should I display my result panel in same page using dynamically enable the result panel, or just to another page? I want to find a general design pattern/ template.
View 2 RepliesIs there a standard practice to organize the process of developing a simple website. there is no use implementing MVC as there is no data base involved. It will be very useful in organizing the project and separating
the aspx files and master page content(this can be very useful in implementing simple cms techniques)
user controls scripts styles images is there any industry standard or best practice for this.?
Update: yes the way i have listed is convenient. but it would be great if i could separate server codes and files like master,aspx.. and the actual page content.
One more reason for not using MVC: I usually outsource the SEO process. Now an MVC application can be greek/latin for my SEO expert. :)
The final structure:
Project
Images
Scripts
Styles
Images
Weblets
Pagelets
aspx files..
the images, styles and scripts will contain only those that are common for the whole project. The weblets and pagelets are in the idea as follows Weblets should contain a collection of weblets. A weblet is folder containing a user control,it's styles,scripts,images etc., Pagelets should contain a collection of pagelets. A pagelet is a folder containing the content for the aspx page. If there is an aspx file named "aboutUs.aspx" then there is a corresponding pagelet named "aboutUs" which contains aboutUs.html,it's styles,scripts and images. the aspx page should only include them here.This can be very useful in configuring CMS. If there can be betterments
I'm planning for development of a RSS Provider/Reader for my website using rss toolkit,
View 13 RepliesI am working on an Asp.net webiste.The response time(in case of a postback) of the pages in the website is ok on my local machine.But when I uploaded the same website to the internal development server and tried to access the server pages from my local machine,its taking bit long(in case of a postback) as compared to my local machine.I do not understand why the same webiste runs slowly on the dev server..
Following is the configuration of dev server.
Microsoft Windows Server 2003 R2 Enterprise Edition service pack 2
Intel(R) Xeon(R) CPU
E5450 @ 3.00GHZ
3.23 GHZ,2.00 GB of RAM
Physical Address extension
Following is the configuration of my local system
Microsoft Windows XP Professional Version 2002 service pack 2
Intel(R) Pentium(R) Dual CPU
E2180 @ 2.00 GHZ
2.00GHZ,1.99 GB of RAM.
I have VS 2008 with SP1 installed on Win XP. I have .NET 3.5 with SP1 installed When I ran and opened an existing project for the first time, I got the below error WebDev.WebServer.exe has encountered a problem and needs to close. After this error, I continusly get "Unable to connect to the ASP.NET Development Server. whenever I run the website. I checked the internet and ASP.NET forum and tried all the following Making port numbers auto assign Making it to a specific port number using the Custom web server Tried creating new web site and checking Replaced WebDev.WebServer.EXE after downloading it from a website My anti virus have not blocked any websites as such I tried resetting VS settings by running devenv /resetsettings what else might be the problem?
View 7 RepliesIn Visual Studio, when I click > Debug, > Start Without Debugging, (with my default browser set to IE), the application starts but it opens 2 IE browser instances. It opens 1 IE instance to start BUT when I close it, it launches another browser instance with the same start page. This bug is repeatable and consistent behaviour, that I can reproduce on-demad in IE.
(In some other minor variations, it seems that depending upon exactly how I start it, it will open 1 browser instance with 2 tabs, each tab having the startup page in it. However, this is not yet repeatable or consistent. It has happened; but, as of now, I am uncertain as the the exact steps to reproduce this particular variation of the anomaly.)
I am using Internet Explorer 8 (IE8).
I am using on Windows 7 32-bit.
I am using Visual Studio 2008 Standard.
I only have 1 startup project defined in Solution properties.
I have all Toolbars And Extensions set to "Disabled" in IE.
I have turned off "Automatic Crash Recovery" in IE.
(This does NOT happen in FireFox.)
We have a largely asp.net web form team (With some Oracle developers thrown in).
Question 1:
Is it a good idea to start using asp.net MVC which will mean redevelopment of a number of standard controls for not much benefit.
Question 2:
Is it a good idea to hire developers where there most recent skills are with asp.net MVC?
I doubt there is any benefit adopting MVC now, given the 100+ applications in this suite of products, and the maintenance/rework this will cause. Given this, is there any particular reason to hire MVC developers, as they won't be hitting the ground running, which is what I need now.
I am planning to develop a social networking website for student of a particular university with following facilities.
Forum, Blog, Creating profile, creating groups , Adding Friends, managing groups, dating, chatting etc.
Now if I start developing it from scratch, this will take a lot of time..
I couldnt find any CMS which can in developing social networking website.
Additionally, I would like the website to have my own custom design. Also it should have support for AJAX, SEO and integrating third party applications.
How do you know what is better to use for writing new programs? We are now using Access 2007 frontend with an SQL backend and we are going to VB.Net, what would be our next logical step?
View 4 Repliesi'm new to asp.net mvc2. i'm developed one project using asp.net mvc2 and vs2010 using linq to sql server. my project like a blog posting comment,
create tickets. my problem is when user register in my blog example my blog name is "helpdesk.com". when user register in my blog with the company name example "something". after registering the user i want to create one sub domain for this user like "something.helpdesk.com"
using this url "something.helpdesk.com" how to server my view pages. i'm not getting any idea. in this concept i have no idea about routing concepts. any body know please suggest me how to create sub domain and how can i server the view pages with in subdomain.
I'm using a BlogEngine.net for my blog and I would like to create 5 different subdomains and point to different subfolders(not redirecting). For example:
firstsubdomain.domain.com - domain.com/posts/helloworld.aspx
firstsubdomain2.domain.com - domain.com/posts/helloworld2.aspx
firstsubdomain3.domain.com - domain.com/posts/helloworld3.aspx
I'm using asp.net 3.5, C#, Windows Server 2008, IIS 7
Is it possible to create a subdomain using asp.net? Or is it possible to use url rewrite on IIS to create/cloak a subdomain.
Rewrite this page to http://www.mydomain.com/myprofilename into http://www.myprofilename.mydomain.com
I have made an asp.net mvc 3 application with an area called blog. I want to route this area to my subdomain blog.mywebsite.com. How can I achieve this?
How do I need to define my route? Do I have to configure the DNS?
Currently I just use the default area route. I can access my blog area for now at this way.
mywebsite.com/blog
I am using MVC 2.0 to create my application,my problem i s related to the routing. Actually in my application each user have required seperate subdomain,like
www.example.com/user1/ ,www.example.com/user2/ ...etc.the default domain is www.example.com.So how can i make it possible with routing in mvc.
i have tried like this,
routes.Add(new Route("{id}", new RouteValueDictionary(new { controller = "User", action = "login", id = " " }), new MvcRouteHandler()));
var defaults = new RouteValueDictionary(
new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional
}
);
routes.Add(new Route("{controller}/{action}/{id}", defaults, new MvcRouteHandler()));
But the problem is that it take deafult (www.example.com) directly to user login page.I want the default page as Home/index and when www.example.com/user1/ it will go to user login page.
I want to have a subdoman (sub.site.net).irst of all, I don't know how to copy my files to this registered subdomain. Second: I want to Redirect my whole website to a new sudomain. for example if a user types: "www.site.net" it automatically goes to "sub.site.net". is it possible? if yes, What should I change? Maybe in my master page?
View 4 RepliesI want to wipe a subdomain off the face of the internet.
So any page in the sitemap I want it to 301 redirect over to the homepage of the main www site...
Can that be done? I tried setting the re-direct in IIS, but it only worked if I hit the homepage (the subpages all 404d)
How to create sub Domain in asp.net. am created some pages in sample folder i need to create sub domain like sample.mydomain.com
how to integrate codings.
I got a website [URL] and I want to redirect http://www.example.com/folder to http://folder.example.com so if
folder has a page called example1.aspx [URL]
It should be called in this way:
http://folder.example.com/example1.aspx Is that possible that using IIS 7 and asp.net 4.
I am creating a social networking site and one of the requirements is to have the subdomain like URL for each user. For example, for the user1 his profile page will be user1.mysitename.com and for the user2 profile page will be user2.mysitename.com.
Can it be done using url aliasing? basically user1.mysitename.com should be www.mysitename.com/profile.aspx?username=user1
I will be hosting this in windows 2003 (IIS6),