|
You are trying to second guess rapidshare ( for that matter any other site ). What happens if they change they page or controls? you code will be easily broken.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yes. That is a problem. However, if I learn how to do it once, then I could do it easier and faster the next time(s). And in the process of trying, I will learn new things.
As a poet would say (I don't like poetry by the way...) it's more about the journey, not the destination.
kostas KEL
|
|
|
|
|
Greetings...
I'm currently working with IIS 5.1, developing a web app using C#, and testing on win xp pro. One of the functions of the web app is to map a drive letter to a network resource. The way I'm going about this is calling a batch file from the application:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = @"C:\tmp\testBat.bat";
proc.Start();
The batch file contains the following:
copy "C:\tmp\src\test.txt" "C:\tmp\dst\testcopy4.txt"
net use X: <some network="" resource="" path="">
I've setup impersonation in web.config, and am only using Integrated Windows Authentication in the web app. I also mapped the .bat extension to cmd.exe. When I click the button that's associated with calling the batch file, I can see that the file copy works, but nothing happens with the drive mapping command. (this is accomplished by checking whether the directory exists elsewhere in the code).
Any ideas? I hope I posted this to the right place. I'm wondering if it has something to do the particular executable...
|
|
|
|
|
alchong wrote: net use X:
Well do you have drive X mapped?
what do get if run net use command
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Yusuf,
I didn't realize that the rest of the "net use X:" line got hidden because the editor thought it was html because I placed it between brackets. What I meant to say is:
net use X: <some network resource path>
I didn't review my post closely enough. Apologies!
and update of my troubleshooting, when I look at the task manager on my computer, I see that when the batch file executes, cmd.exe and net.exe run under the ASPNET user name. I'm not sure why this is, since I set up impersonation, perhaps I'm missing something in my configuration?
modified on Thursday, April 9, 2009 12:03 PM
|
|
|
|
|
what do you get if you run your batch file manually on the server.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
When I run the batch file manually it works. Also I edited my last message, but if you didn't catch it, when the batch runs from the web application, I noted that cmd.exe and net.exe run under the ASPNET user name, and do not seem to terminate. Is this something to do with my configuration? I thought I setup impersonation properly.
|
|
|
|
|
alchong wrote: I noted that cmd.exe and net.exe run under the ASPNET user name, and do not seem to terminate.
You need to set the flag to terminate the command window. I don't remember since it has been very long time. run cmd /? and you will figure it out.
alchong wrote: Is this something to do with my configuration? I thought I setup impersonation properly.
I don't know. may be asp.net account can not perform network actions. again this is a guess, I have no proof for that.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Yusuf,
/C was the flag.
I guess I'll need to figure out if I can configure impersonation properly to run net.exe & cmd.exe under the web application user credentials instead of the ASPNET account.
|
|
|
|
|
Good luck. Let us know your finding. We can all learn from your work. Thanks
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
How to set password length for Login Control in ASP.NET...
|
|
|
|
|
Hey, do your self a favor. You can not learn by posting trivial question every now and then.
STOP what you doing and pick up a book, read and learn. This can be learned in short period of time.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Thanks...But could you please help me with ASP.NET login control password length?
How to set it?
|
|
|
|
|
Sr...Frank wrote: But could you please help me with ASP.NET login control password length?
why? Is Google [^] broken where you live?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I have a Gridview inside (updatepanel->modalpopupextender->gridview)
i bind the below data at runtime and i dont use any boundfields,templatefields.,
sid sname rollno
---- -------- ---------
266 dd ddd dddd 1
264 ds dd 2
270 eee durgesh lal 3
237 i o b 4
268 onehobbie twohobbie threehobbie 5
265 ss ee 6
I want to edit rollno data i.,e i want to provide one textbox for editing
------
rollno.
For Providing Textbox i am using below code.
protected void GvStudentInner_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[2].Controls.Add(new TextBox());
}
}
It is providing the textbox in gridview but with empty textbox,
i want the textbox along with the cell content.
and
if i simply click on Button1 the edited cell data should be stored
into database,how to do this one??????????????????
Plz Plz urgent
|
|
|
|
|
Why are you cross posting ? You have asked the same question just few hours back.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
How to set session object for Login Page...
When user click back button it should not redirect to other page...
|
|
|
|
|
Sr...Frank wrote: How to set session object for Login Page...
The same way as other rest of the pages
Session("yourSessionVariable") = yourSessionValue
Sr...Frank wrote: When user click back button it should not redirect to other page...
This can be handled at the client. You need some javascript code to do it. Google is your friend.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Where to set?
Could you please provide me sample of it..
I am new for ASP.NET
|
|
|
|
|
Sr...Frank wrote: Could you please provide me sample of it..
Oh yeah! There are plenty of articles here at CP. Pick your choice and start learning http://www.codeproject.com/KB/session/[^]
Sr...Frank wrote: I am new for ASP.NET
Being new is not a problem. We all started somewhere. There is a lot to learn if you willing to read.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
|
Hey all,
In my backend (code), i've got a Bitmap, which I've filled with some pixels.
Now I want to show this image on an aspx page. Does anyone has any idea how to solve this problem.
I've tried <asp:image xmlns:asp="#unknown">, but this needs an url.
I Also tried but this also needs an url.
|
|
|
|
|
Img tags are the only way to show images over an HTML. Img requires an url directly to the image. so you have to store the bitmap to your virtual dir and then get the image.
There is no other way of doing this.
|
|
|
|
|
Thank you for your response. Though the anwser has been given to me by my colegue.
It's like this:
backend page 1:
Image1.ImageUrl = "GetImage.aspx?id="
backend page 'getImage.aspx':
int number = int.Parse(Page.Request.QueryString.Get("id"));
Bitmap b = makeImageByNumber(number);
Response.ContentType = "image/jpeg";
b.Save(Response.OutputStream, ImageFormat.Jpeg);
Response.End();
|
|
|
|
|
That means you are directly writing the image stream to the response. it is same as making writing a static link.
If you want to do this, why not u use a special handler for the response. Like ImageResource.axd which corresponds to an handler which will produce images. Even Microsoft does take this steps for writing javascript files to the client.
|
|
|
|