|
Hi there,
I had a project which is running on web server.In that
I had memu tree.On click of menu item I want to open page which is present in admin folder.But when I click on menu item I get following error.But if I place that page in root directory then that page opens after clicking on menu tree.Can anybody knows what is the reason.
Server Error in '/' Application.
Cannot use a leading .. to exit above the top directory.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
System.Web.Util.UrlPath.ReduceVirtualPath(String path) +8855207
System.Web.Util.UrlPath.Reduce(String path) +52
System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) +214
System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +180
System.Web.UI.WebControls.Panel.AddAttributesToRender(HtmlTextWriter writer) +8625143
System.Web.UI.WebControls.Panel.RenderBeginTag(HtmlTextWriter writer) +21
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +20
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
Life Is Beautiful
|
|
|
|
|
ais07 wrote: Exception Details: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.
The error means what it says. You are using virtual paths, and when you change the location, that causes them not to work, because they try to go above the root of the application.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for reply Sir,
I am not getting what you had explain.Can u please explain in brief.
Thanks.
Life Is Beautiful
|
|
|
|
|
how are you writing an ASP.NET application if you don't understand what I said ? I can't make it any simpler. The error message means what it says. You're using virtual paths, which means when you move the page location, the file path also changes.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have a div in my master page. The contentplaceholder is inside that div. My need is to display the page without scrolling the page. If the content in my page is heavy then the page will not scroll in the sense my banner and the footer have fix but the content inside the placeholder will scroll. But my problem is when i give a particular height to the div when i enter the full screen mode the footer will shifted to almost middle of the page..
I want to place the content inside that div and i need the scrolling in both full screen and normal screen mode with my footer fixed at the bottom of the page... And i need this property browser wise... Atleast for safari,IE,mozilla,chrome..
Have any solution for this problem... I will copy my design below...
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
|
The class divStyle include the property
.divStyle
{
height: 435px;
overflow: auto;
}
Oopppzz!!!!!!!
|
|
|
|
|
Hi to All,
i have 1 problem, i want to implement captcha control in asp.net,i have searched on google also but not found any helpful result.
can anyone tell me how can i use captcha control in login page
Thank you.
|
|
|
|
|
captcha is never used in login that I've seen. Certainly the built in controls do not offer that ability. There are commercial CAPTCHA libraries, if you don't want to write your own. You will probably need to roll your own login code, also, and not use the built in stuff.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanx for yr rpl but i just need to use captcha control in application,
login page was just an example,how can i use captcha control in asp.net
|
|
|
|
|
I told you. Buy one, or write one.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Look there's one here[^] on CP!
|
|
|
|
|
Have a look into this,
CAPTCHA Image[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi...
I have a div which is opened at button click.
I want to disable all content in page,except opened div.
After closing div content should enabled.
How can i do this.
Kindly help to solve this issue.
Thanks.
PUJA FALDU
|
|
|
|
|
The best way to do this, IMO, is to put a transparent div over the whole screen, then position your content inside it. That way, the div gets the clicks. In fact, I suspect that's the only way. That's how the ASP.NET AJAX controls do it AFAIK.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hiiiiii
I m running a .exe from asp.cs page .job of exe is to generate images in a folder which is already there in my application.exe is running and woking properly when i m running the application in my system at localhost.but when i m running my application in the clint side on there application server then exe is running but it is not doing any thing ,i have seen in my
task manager that exe runs but take no cpu storage.
its really urgent........
thanks in advance......
|
|
|
|
|
naveen attri wrote: its really urgent........
No, it turns out that it's not urgent at all. At least, not for me.
Why do you need to run this exe to generate images ? Where do the images get generated ? How does the exe get run ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
res = new RemoteExecuteServer();
res.opt = "^^" + mProjectName + "^^" + mGraphName;
res.serverPath = Server.MapPath("APAMonitor_CL.exe");
res.Run();
now we run new thread like
public class RemoteExecuteServer : MarshalByRefObject
{
Process myProcess;
public String opt, serverPath, PID;
public void Run()
{
myProcess = new Process();
//ProcessStartInfo info = new ProcessStartInfo(path);
myProcess.StartInfo.FileName = serverPath;
myProcess.StartInfo.Arguments = opt;
myProcess.StartInfo.RedirectStandardInput = false;
myProcess.StartInfo.RedirectStandardOutput = true;
myProcess.StartInfo.WorkingDirectory = serverPath.Replace("APAMonitor_CL.exe", "");
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.Start();
PID = Convert.ToString(myProcess.Id);
myProcess.WaitForExit();
}
public void ClosePro()
{
myProcess.Close();
}
}
the same thing is working on localhost but not working on clientside
is there any authentication problem on client side.......
|
|
|
|
|
Well, there are many questions here.
1 - how do you use these image, once they've been created on the server ?
2 - what happens if more than one person is using the site at the same time ?
3 - how does the user get to see these images, it's surely on a later page to the one they are viewing ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
aftere generating images we are attaching the images to image control.
and then show to the user.but on running the exe the images are not generating at all at server in the specified folder.i m thinking that any pemission is needed which is not available.
|
|
|
|
|
OK, the whole thing sounds messy to me. Certainly your code is more than a little dodgy, IMO. However, overall, if the images are not there, then yes, it's bound to be a permissions issue. Why do you need to spawn a seperate process, why can't you just have the code run inside your web app ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
with the current situation wt are my options .
may i get any help on permission issues.any idea will be apprecialble.
|
|
|
|
|
Do you own the server ? If not, you're out of luck. What you're doing, seems dumb to me. Like I said, if you need to process images, import the code into your web app. I assume you own the server tho, if you can watch the app running. So, write some debug code to work out what is going wrong, I'd guess it's going to be folder permissions.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
ya i m working on the client server.I have given the aspnet account full permission.no result ...........any idea which permision is needed..........
|
|
|
|
|
I'm sorry. I'm not sure how else to say it. I think what you're doing is stupid. I think your code is messy. I think this is just overall a bad idea. I would never consider doing anything like this. For all these reasons, I have no idea what the specific problem is. I think you need to import the code into your project, or at a minimum, add some debug code to the exe you're using to find out what the error is. If it's a third party exe, I'd say you're well and truly out of luck.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanks for ur help.............
|
|
|
|
|
In the absence of any answer, I can only assume that your basic problem is that the exe runs on the server, and you're expecting it to run on the client. when you're on localhost, the server and client are the same machine, that's why it works.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|