i am facing one issue in my asp.net 3.5 application.
www.abc.com/default.aspx - this works perfectly
when user tries to add anything after aspx after / like www.abc.com/default.aspx/xyz
my css gets disabled, and page works which i dont want.
i have used error pages but it didnt work in this . i want to disable anything user enters after url www.abc.com/default.aspx
if user enters www.abc.com/default.aspx/xyz it should display error page
how to do it ?
thankx in advance
This belongs to StackOverflow.
but this sounds like is a simple issue that your CSS is relative (does not start with /), try change the <link> in the <head>-section to have a forward slash at first.
Related
I have an mvc app to test and my code works with Chrome but not Phantom. It can't find a simple input control with id = "password" on the logon page. I've tried different selectors, xpath, by class, by ID, even different controls on the page. It can find the "body" tag and the very next, but nothing is working to find anything past the next level in
I've also tried driver.waitforpageload and thread.sleep to make sure things are loaded first, no avail. Ideas anyone?
It can't find a simple input control with id = "password" on the logon
page.
and
It can find the "body" tag and the very next inside tag
"app-controller", but nothing is working to find anything past the
next level in, the view-manager tag.
and
I've even tested google.com to see if it was even loading and it can
find controls on that page successfully.
Considering the above, I'm guessing that the Login page is your page in your site after navigating to the URL.
I have encountered the same issue which normally led me think that PhantomJS cannot identify the elements on page. This until I started debugging stuff.
Because of the way how PhantomJS works loading everything headless, more or less in his own 'container' it turned out that it wasn't even able to load my test site, because it didn't had all the necessary prerequisites executed.
To be able to debug, and check if you face the same issue, just print to a log file the content of your page.
You can achieve this by using: var pageSource = driver.Pagesource;
It's highly likely that the last node present will be the body one.
If that's the case, you need to see what prerequisites are required for your site to start working: authentication, HTTPS certificates, etc.
I'm working with webbrowser tool trying to build my own browser.
Something that i'm having trouble doing is the history part.
When the document completes navigating , I search in my database if its URL doesn't exist then I add it to the history, else I just increase the "counter" of this page in the database.
The problem is that when I enter some pages each time it gives me different URL but it's the same page ! such as google.com , when I navigate to it it gives me in the first time (for example) : https://www.google.co.il/?gws_rd=cr&ei=eBP-UtPCOMi84ASukoCAAw
the second time I navigate :
https://www.google.co.il/?gws_rd=cr&ei=rhP-UpW6CYG54ATAqIHIDg
Is there a way to identify that both these URLs lead to the same page ??
I'm trying to do this because when I load the history to my application , many URLs are loaded that are leading to the same page.
Any help is appreciated , thanx in advance
You can use the Uri object and ask for the AbsolutePath property
I personally would expect my browser to have the history by URL and not by content (that's what you actually try to do as far as I understand). But if you want to avoid these multiple entries, you might calculate a hash code for each content received by that page and increase your counter.
The problem is that you cannot know what the server will do with that URL. It might be the same today and different tomorrow. I also wouldn't just go for the URL without the parameters because on other pages the parameter might make a really important difference.
Another note: In case you hash the content, you might want to exclude things like 404 pages (which can occur with different URLs and shouldn't be grouped under the same hash.)
I got below error while debugging the code:
Exception Details: EPiServer.Core.PageNotFoundException: Page 6535 was not found
Please suggest the appropriate solution
Regards
You are trying to get non-existent page. You can check this code link
new PageReference(int id)
Perhaps you need to create it in Edit-mode.
You can get through the start page link
ContentReference.StartPage
And then get all tree pages and see where missed. http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/
If this happens when you start the application it means that the startpage in episerver.config is configured to that ID (and it doesn´t exist), or that you have a page provider configured for this ID (and it doesn´t exist).
If you are getting this error as soon as you visit your page, just login and go directly to edit mode. It could be that your startpage is pointing to a page that has been deleted or something alike.
So take your host and add /util/login.aspx
That will take you to epi login. Once you are logged in, check your episerverframework.config (depends on which version you have but just try to find out the path to your cms) and see what kind of virtualpath the cms has. Could be /Epiui/cms or something alike.
You might need to add /edit or /admin depending on what you want to reach. But /edit should be your choice in this particular situation.
Then check your startpage for missing pages to see what could be pointing to that page.
It's a late answer but it might help you or someone else out :)
Do you already have a functioning website or is this a new installation? If it's an existing one, go into Episerver's Edit mode (yoursite/episerver/cms/edit/) and use the search (top right of the screen with the magnifying glass icon) and enter the ID (6535) of the page that's missing, the page in question should appear in the search result.
I am using the Tiny slideshow in my asp.net page. It works fine in all the Browser and here is the LINK, But my problem starts when I include that page in my master page and display the same. the Jquery stop working in Internet explorer.
http://www.spareach.com/public/xtemp8.aspx?userid=22&AspxAutoDetectCookieSupport=1
I am tired a lot for this.
Can any one help me please.
your script interpreted by ASP.NET Session. the actual URL of file is http://www.spareach.com/lightbox3/script.js. if you put the absolute URL then they work fine. hope this helpful
If you include that in another page, your relative link to the .js file is going to be invalid. So, your options are to make it absolute (http://www.something.com/folder/tiny.js) or to include the .js from the head or common document, if you use that structure.
I want to redirect from one page to another based on condition .
For e.g I want to redirect from www.abcd.com/Doc/blogs.aspx to www.abcd.com/movies based on condition which I need to check from code behind C#
I was trying to use Response.Redirect("movies.aspx");
but its not working in IE7
I am getting Http 400 bad request....
whereas in Firefox its working fine any idea how to resolve this problem
If anyone knows how to achieve this?
Thanks,
Try Response.Redirect("~/movies.aspx");