|
Read through the scenario.
client A wants to read files from another client B present in the same network. But this reading should be done through a ASP.NET web application . In other words a client should be able to read a text file present on another client in the same network.
This scenario would be applicable in an intranet application. The thing <code>to note is that the path of client B would be present in the server. The client A would pick the path from the server and navigate automatically to client B, hunt down the necessary folder and read the text files and store the necessary data in a database.</code>
This was my earlier post yesterday. I intend to carry this forward for gathering more insight. Here is the code on which I am working
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
DataTable dt = new DataTable();<br />
<br />
<br />
StreamReader sr = new StreamReader(@"\\Pc4\C$\NDP\Test1.csv");<br />
string line;<br />
while((line = sr.ReadLine()) != null)<br />
{<br />
Label1.Text += line;<br />
<br />
<br />
}<br />
<br />
}
The client A when he executes this code is intending to access another client B (Here it is PC4 in the same domain).
In my web.config I have <identity impersonate="true">. The code resides on server in Win 2K3 box.
This program works fine when I am executing it from the server, but fails from a client. Any pointers or are further clarifications required?
|
|
|
|
|
What user context are you running the application under?
|
|
|
|
|
I have identity impersonate="true" in web.config. In the Directory security I have Anonymous Access and Windows Authentication turned on.
|
|
|
|
|
Hi friends
How to check the LAN connection status using vb.net 2003(webapplication )
Regards
saravanan
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
|
my .net application is nw running in mozilla how change it to Internet Explorer
|
|
|
|
|
Right Click on the aspx file in Solution Explorer.
Choose Browse with... option.
Select your browser.
oops I nearly forgot. You can press the Set as Default button to make it default browser for your .net applications
|
|
|
|
|
hello guys;
i developed a s/w whic let the user upload an image to our server.
Now i need to display all the images in that file on the web page, regardless of the name .
please if some body could help i'll be greatfull
thanks in advance
|
|
|
|
|
Hi ,
i have a question. in asp.net pages and with asp.net controls, i can do localization by using resourcekey property. But i need to use localization with html controls. i try it with the same way in asp.net controls but it doesn't work. is there any way use it with html controls?
Thanks
|
|
|
|
|
Hey
How can i get Gridview to show data Vertical and not horizontal in c# ?
Thanks very mutch..
|
|
|
|
|
use detailview to show vartical
siri
|
|
|
|
|
how should i introduce the auto increment field in the cross tab crystal reports in asp.net 2.0
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Using .Net 2.0...
When a user logs in to my site, I set a few session variables with his user info. When the user clicks "logout", a logout page is loaded that clears the session variables completely (with Session.Clear(); ) and redirects to Default.aspx. However, after logging out, if the user manually types in the url for a members-only page, it appears to still think they're logged in. It's almost like the browser has cached the members-only page.
Did I explain that okay?
Is there a way to clear specific pages from the cache?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Use following line in the Page Init/Load of the specific page you want to remove from the Cache,
Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache);
HttpCacheability also has few more enumerations.
|
|
|
|
|
I was actually looking for something that I coudl use at the point the user logs out, like being able to tell the browser to remove certain pages from the cache.
I've already tried the thing you suggested (in Page_Load of the given pages), and it's too heavy handed (I need to keep some variables around that can't be put in the Session vars.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Are you sure that session is cleared ? I had the same issue. When URL's are typed straight, it loaded the page. But it will redirect when we hit F5. Is it redirecting for you ? Disabling caching methods didn't worked for me. I think it's browser behavior and we can't control much.
|
|
|
|
|
Also try with Session.Abandon() . I think Session.Clear() clears the values, but the session instance would be still active.
|
|
|
|
|
John Simmons / outlaw programmer wrote: I was actually looking for something that I coudl use at the point the user logs out, like being able to tell the browser to remove certain pages from the cache.
Presently not available in ASP.NET.
John Simmons / outlaw programmer wrote: I've already tried the thing you suggested (in Page_Load of the given pages), and it's too heavy handed (I need to keep some variables around that can't be put in the Session vars.
No other way. I have developed websites which are using HttpCacheability to pages which are to be authenticated. I suggest you to not to use Sessions widely, particularly heavy objects like DataTable....
|
|
|
|
|
hi iam trying to make a global function where all my asp.net .cs files can use it.
its a rather basic function with nothing special inside
anyone know how to make a function global to all of my asp.net .cs file?(need refresh)
thx
|
|
|
|
|
In other words you want to make a static utility class
public static class Utility
{
public static void MyUtilityMethod()
{
}
}
modified on Friday, January 18, 2008 11:29:33 AM
|
|
|
|
|
Colin Angus Mackay wrote: public static class Utility
{
public void MyUtilityMethod(/* args go here*/)
{
// Do stuff here.
}
}
You can't declare an instance member inside a static class, I guess ?
|
|
|
|
|
N a v a n e e t h wrote: You can't declare an instance member inside a static class, I guess ?
Oops! I've corrected it.
|
|
|
|
|
neodeaths wrote: hi iam trying to make a global function where all my asp.net .cs files can use it.
Put your classes in app_code (ASP.NET 2.0 or later) directory which can be accessible from anywhere in the application.
|
|
|
|
|
hi all
help me in this issue...
i have pages with the name default1.aspx and default2.aspx.
from the default1.aspx i have navigated to default2.aspx..
and i have a back button in default2.aspx page.. when i click on back button i should know the previous page (i.e from the page which i have navigated to default2.aspx) and should go there...
can anyone help me in this..
thank you.
siri
|
|
|
|
|
I have page where the users can register with some input fields. I dont want the user to be able to push the backspace button so it navigates to the previous page. How can I do that?
_____________________________
...and justice for all
APe
|
|
|
|