I upgraded from 3.5 to 4.0 and noticed links in my subdomain behave differently - they still work, but add a redundant folder - for example: sub.mysite.com/sub/mypage.aspx. In 3.5 it was: sub.mysite.com/mypage.aspx. The code is thus: asp:HyperLink NavigateUrl="~/mypage.aspx"... The sub folder is a root in IIS7. Is there some way to avoid the second /sub/ showing in the broswer address bar so it looks like it used to in 3.5? Is there something I should place in my 4.0 web.config file?
I have some services deployed on [URL]I want to move them to [URL]. I have [URL] physically hosted & has its own web.config file. No inheritance issues...
I configured the subdomain (through my host--I don't actually own the web server) so that the subdomain is physically hosted & made sure it's running as an IIS application.
When the services lived on [URL], I used the following address prefixing in web.config:
[Code]....
Now that they're on [URL], I modified the web.config to read:
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"
I'm trying to enable rewrited urls in my project.it's very good described in this post: urlrewriting by scottgu It works very well when im running it on localhost, but as soon as i upload it to my host (.net 3.5), it doesn't work! i always get redirected to a 404 page!Is there a configuration needed to enable this? as scottgu says no, but i don't find out why it's not working.
I have implemented URL rewriting and I would like someone to answer if my new URLs will be indexed by google or not.
BACKGROUND:
I have many databound linkbutton which redirects to URL like: www.example.com/product.aspx?PLU=4985783028
What I intended to do is to make above URL look like www.example.com/MY-Nice-Product1-For-Sale-4985783028.xyz . Whuich internally should rewritten as above. I could have easily implemented such URL rewriting but all my databound link button redirects to
/product.aspx?PLU=4985783028 and when this the page at this URL is served to browser it will look like /product.aspx?PLU=4985783028 and not /MY-Nice-Product1-For-Sale-4985783028.xyz
WHAT I DID:So I implemented my own method of Rewrite. Steps for which I did is as follows
1. I wrote code inside Global.asax in Application_BeginRequest event.
2. I checked for URL if its product.aspx or not (using fullOrigionalpath.Contains)
3. If its product.aspx I would takeout the "PLU" Query parameter and by string manipulation and then call a function to determine product name from the unique ID ("PLU").
4. And then I would redirect the page to "/productname-PLU.xyz" (e.g. here productname is "MY-Nice-Product1-For-Sale" . AND PLU is "4985783028" so that is redirects to "/MY-Nice-Product1-For-Sale-4985783028.xyz")
5. Once redirected, again, "Application_BeginRequest" event will be called. and there I would check if URL contains. ".xyz" extension.
6. If so, I would takeout PLU by string manipulation and then rewrite URL to right URL which looks like "/product.aspx?PLU=4985783028"
7. Then after user will see "/MY-Nice-Product1-For-Sale-4985783028.xyz" on their browser addressbar
This is how I achieved my goal so that all old URL redirects works too and all new URL works too and in both case user will see new URL.
Following is the code
[Code].... So finally the question is "Will my new URL be indexed by Gooogle?" because the basic intention of doing this was to help with SEO .
I just want the url /style/style.css to point to another static file on the webserver..
I'm getting this error:
There is no build provider registered for the extension '.css'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.
I hosted my project on Godaddy server and they say that the settings required for Url rewriting was already there.But I am getting a blank page when trying to use virtual url to redirect to a aspx page.
I want to perform some basic URL rewriting.http://locahost/website/ChangeMeIt seems I can't get the server cofigured right to do this.I created my own customer HttpHandler.by the time the my handler gets the url .... it has already been changed by asp.net to ChangeMe.htm ....Does anyone have anyclue on where IIS7 or ASP.net is messing with the URL?I have tried the built in Rewriter and Intelligencia.UrlRewriter and ".HTM" gets appended to every single extensionless request.
I am working on url rewriting all is working fine on my local machine when i upload this site on production server the link of url rewrite which is extension less not work. i search the multiple solution in the google one solution is that insert the aspnet_isapi.dll in the properties->virtual directory tab->configuration->insert aspnet_isapi.dll site in working, but problem is that hosting provider refuse to add this dll. tell me alternate solution to add this dll from web.config file.
In my website users can create thier own websites by making folder of thier choice like: [URL] Where the folders Pankaj and Adam are storing in database. I just want that when user after creting thier website just clicked or type the address of thier website as [URL] then if the folder with name Pankaj exists in database then the page will open otherwise it gives the http 404 page not found error. And while the address [URL] is opens then i donot want to physically create it on server. My requirement is that i want to open it by the concept of url rewriting/ Routing. Which one concept will be good for this. And can anyone provide some code with example that how can i achieve this easily.
I am getting this error on a website. does that mean the server is not competible with asp.net 3.5
Configuration Error Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Excuse me this common error. I´ve found a lot of info in Google but I´ve not found my error. I´m trying to read some data from a custom section in web.config and I don´t know which is my error?
I built my ASP.NET website using vs2008 professional.
Now I have purchased vs2010 professional edition.
I do format my computer and then installed vs2010.
Now I want to deploy my website in vs2010, but it is giving configuration error in <add assemblies...
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
We can retrieve configuration sections from web.config in the following two ways: Configuration config = WebConfigurationManager.OpenWebConfiguration("/"); AuthenticationSection authSection = (AuthenticationSection) config.GetSection(@"system.web/authentication");
Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings
Example 1:
<!-- This is an example Web.config file -->
[Code]....
In this article, we will see how to read the configuration settings in the web.config using 'JavaScript'.
Step 1: Create a new ASP.NET website. Add a button control to the Default.aspx.
Step 2: Right click the project > Add New Item > Web Configuration File
Add the following sample entry to the appSettings section in the web.config between the <configuration> tag as shown in the example 1:
<add key="var1" value="SomeValue"/>
Step 3: To read these entries using JavaScript, add the following script in the <head> tag of your Default.aspx page as shown below:
<head runat="server"> <title></title> <script type="text/javascript"> function ReadConfigSettings() { var v1 = '<%=ConfigurationManager.AppSettings["var1"].ToString() %>' alert(v1); } </script> </head> Step 4: Call this function on a button click and display the values of the configuration settings
<input type="button" value="Get" onclick="ReadConfigSettings();" /> That's it. Run the application and click the button. The value of the key in the appSettings will be displayed in the alert window. I hope you liked this short article.