URL encryption of an URL aliased asp.net web page - c#

The requirement is to URL encode the ASP.NET web page URL which is having Ektron Alias.
Its unable to get the aliased URl using context using HTTP Module.
So getting confused, kindly help.
Thanks in Advance.

The problem was resolved.
Added a small Utility class to the App_Code with a module config entry in ektron.
This link helped in solving it.
Thanks
Libin

Related

Nopcommerce long url

I'm using an old nopcommerce 1.90
When i'm trying to access admin panel it generates very long url in all admin pages...
For example: www.mynopcommercestore.com/(F(rdJxygsKRvgH2-aXCIZR0C3pi39UpnKohhHrrbT1ATunvMt4FfV88V0ebEUgb_XXiUkww8KnBeaG66D6wjA82Kl4UsbeUHmBQN2Pp0fn08yISQ6wyjuFhPZFC-5AiXJuTPvTdDEgf7wCucjqc6hPhK_d-GuuNrpSQklM7tjy4kybCjFA4i15IEGfu8tNUWOV9lCqJBEJuE0CXV96XVhHY2n-ykKlQUxLkoVC49txwzls2iMU0))/administration/ProductDetails.aspx?ProductId=563
What is this "strange" string? cookieless? (i have already set it to false)
I'm getting an error when i'm trying to upload an image in ckeditor
(The server didn't reply with a proper XML data. Please check your configuration.)
XML request error: Request-Uri Too Long (I have also set in web.config maxUrlLength="2097151")
But when i remove this "strange" string from url it uploads well.
Could someone help? How to avoid this long url in system?
Kind Regards
You should disable "Cookieless Sessions" in web.config file. Please find more info here

site will not redirect to custome page and throw 404 error in asp.net site

I don't know this question is already asked or not. But i am stuck in one problem.
I have one CMS application in that some page are static and some are dynamic.
When i access url using http://abc.com/abc.aspx
Now in this case if abc.aspx is cms page then it will redirect me to that page but if it is not cms page then this will redirect me to the my custom page http://abc.com/page-not-found.aspx
Now my question is that if i write only http://abc.com/abc then it will didn't redirect me to the http://abc.com/page-not-found.aspx but it will throw me the error 404 page or directory not found.
Now I have to check two things
1) if any custome page is not there then it will display http://abc.com/page-not-found.aspx
2) when http://abc.com/page then it will also redirect me to http://abc.com/page-not-found.aspx
Please help me our from this. This will work fine in my local but only problem in live environment.
Thanks in advance.
Regards
AB Vyas
You may need to look into Handlers in your web.config .
http://msdn.microsoft.com/en-us/library/46c5ddfy(v=vs.100).aspx

Custom URL making- URL rewrite

My URL is "http://properties.Poject.net/Public.aspx?account=ACCOUNT&id=HL101"
and my desired URL is http://properties.Poject.net/ACCOUNT/HL101
Please help me to achieve this. ALso i don't have URLWrite option in my IIS 6 and my project is under .net 3.5. Please help me config in Web.config
Thanks.
Manu
Use the concept called Url Routing in asp.net
refer article
http://www.asp.net/web-forms/tutorials/aspnet-45/getting-started-with-aspnet-45-web-forms/url-routing
http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx
use the following two links, it briefly describe how to apply url Routing,by the way URL routing is more advance concept then URL rewriting so use that.....
https://web.archive.org/web/20211020111718/https://www.4guysfromrolla.com/articles/012710-1.aspx
http://msdn.microsoft.com/en-us/magazine/dd347546.aspx

after publishing website, Internal URL did not work

I design a website by Umbraco. Before that I published it. All everything was OK.
But after publishing, link to internal webPages did not work.
befor publishing:
"http://localhost:4402/testgroup/testgroup01/testitem01.aspx?nodeId=1400"
after publishing:
"http://localhost/testgroup/testgroup01/testitem01.aspx?nodeId=1400"
I do not konw what to do..
PLEASE HELP ME.
Note:
In code behind, at the beginning of href tag, added "/.." or "/~" or "~" but did not work.
All "" created dynamically by HtmlGenericControl
I found it!
I create a website in IIS in "Sites" node.(already exist in "Default Web Site"). and I gave a port for website (for example 5050).
It be solved.
Thank you from all of you that try to solve my problem.
Try to set the bindings in the advanced settings of your website at the IIS to this:
http::4402:
Provide that code, the way you link to the pages in your ".cs"
If virtual path is /NAMAAD then use the http://localhost/NAMAAD/ as a base and go down to the page you need.
Also, I cannot see the folders testgroup or testgroup01 in the NAMAAD, check where exactly is the page you want.

mapRoute to a Web Form using ASP.NET 4

I have a Url like this
http://localhost:4737/Site/listing/NH/Plaistow/2831516
and I want it to reroute to
http://localhost:4737/Site/listing.aspx
I was reading how to do this for Web Forms here
https://web.archive.org/web/20211020111718/https://www.4guysfromrolla.com/articles/012710-1.aspx
Here's what my route looks like.
routes.MapRoute(
"FriendlyUrl",
"Site/listing/{state}/{town}/{mlsnumber}",
"~/Site/listing.aspx");
In my listing page I plan on accessing the following variables
Page.RouteData.Values["state"]
Page.RouteData.Values["town"]
Page.RouteData.Values["mlsnumber"]
But when I navigate to http://localhost:4737/Site/listing/NH/Plaistow/2831516,
I just get a HTTP 404 error.
I know how to get this working with MVC, but this is a fairly large application, all written with web forms, so rewriting isn't feasible.
Any ideas on how to troubleshoot this would be helpful.
Thanks !
Here is the working code. Thank you to mrchief for helping me resolve this.
routes.MapPageRoute(
"FriendlyUrl",
"listing/{state}/{town}/{mlsnumber}",
"~/listing.aspx");
Yore doing it the other way. If you're using WebForms, you need to implement UrlRoutingModule as shown here: https://web.archive.org/web/20201205221404/https://www.4guysfromrolla.com/articles/051309-1.aspx
The Routing Rules were designed for use in ASP.Net MVC applications where you redirect a Url to its appropriate Controller (Page in WebForms) with action params (query params in WebFroms parlance).

Categories