|
|
Dear All
I have problem while reading a folder on a mapped network drive.
I have an asp.net application which resides on a web server. This application reads a folder on another machine. The folder is mapped to a network drive W: in the server machine.The code which i am using is ,
DirectoryInfo DirInfo = new DirectoryInfo(@"W:\FolderName");
DirectoryInfo[] subDirs = DirInfo.GetDirectories();
The error message i am geting is ,
Could not find a part of the path "K:\FolderName".
But if i use the path as , \\IPAdress\FolderName, the application will read the directories of the folder without any problem.Where IPAddress is the IP of the machine where the folder resides.
Please HELP!!!!!
Thanks in Advance
Difin
|
|
|
|
|
There are a couple of options that your ASP.NET application may use to read the network drive:
+ Impersonate a domain account that has the permission to the folder.
+ Stick to the UNC path instead of using the drive name.
+ Run the ASP.NET process with the power account that is able to access the network drive.
|
|
|
|
|
Hi minhpc_bk
Run the ASP.NET process with the power account that is able to access the network drive.
How can we set this...
Regards
Difin
|
|
|
|
|
Hi All,
My application developed in ASP.NET with C#.NET and Oracle as Database.....
Application is running fine at my machine... but at client PC it gives error...
It have a connection problem with oracle, I try to used 2 driver of Oracle...
1 - OraOLEDB.Oracle.1
2 - MSDAORA.1
When i used OraOLEDB.Oracle.1, it not shows the Data in Datagrid
When i used MSDAORA.1 , it gives error "Oracle error occured, but error message could not be retrived from Oracle"
I done all necessary action, like reinstall MDAC and windows update...
but no success.....
plz help
|
|
|
|
|
Plz provide me some code to send SMS from my ASP.NET webpage. Plz mention free services/ web services. ASAP
|
|
|
|
|
DGtech wrote: provide me some code
Clickety[^]
|
|
|
|
|
|
When i click a label, then current webpage will be closed, how to do it ?
Thanks.
Best regards,
Chee ken
|
|
|
|
|
Add the event to the label onclick in the code behind file :
Label1.Attributes.Add("OnClick","javascript:closeWindow();");
create a javascript function in the aspx:
<br />
<script language=javascript><br />
function closeWindow()<br />
{<br />
window.close();<br />
}<br />
</script>
Thats It .... when u will click on the label, the window will be closed.
Sushant Duggal.
|
|
|
|
|
function closewindow()
{
window.close();
}
i using this one can run already , but how to make it become a hand cursor when my mouse pointer point at the label ?
Best regards,
Chee ken
|
|
|
|
|
add style tag to label
<code>style="Cursor:hand;" </code>
I am typing cursor but codeproject is changing it to removed
Sushant Duggal.
|
|
|
|
|
It works already. Sushant Duggal, thanks.
Best regards,
Chee ken
|
|
|
|
|
Hello,
I created a Repeater at runtime with an AccessDataSource.Everything Works fine!
Now I need to use the same repeater but with a DataSource created in my VB.Net code.
I created a DataView but the Repeater doesn't show anything!
I don't get any error so I have no idea what is going on.
This is my function which creates the datasource which in this moment has only one record:
Function DataSource() As ICollection
' Define channels data table
Dim dt As DataTable
' Create channels data table
dt = New DataTable
dt.Columns.Add(New DataColumn("ChannelId", GetType(String)))
dt.Columns.Add(New DataColumn("ChannelName", GetType(String)))
' Add news channel data row
Dim dr As DataRow
dr = dt.NewRow
dr(0) = "News"
dr(1) = "Noticias"
dt.Rows.Add(dr)
' Return RSS channel dataview
DataSource = New DataView(dt)
End Function
Could someone please help me out?
Thanks,
Miguel
|
|
|
|
|
Then how do you use this datasource with your repeater control? Do you assign it to the DataSource property of the control and call the DataBind method?
|
|
|
|
|
I have it as Follows:
Private Sub rRSSChannels_Init(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Init
' Define rRSSChannels properties
With rRSSChannels
.DataSource = DataSource()
.DataBind()
End With
' Define repeater item template
rRSSChannels.ItemTemplate = New rRSSChannelsTemplate(Me, ListItemType.Item)
End Sub
|
|
|
|
|
I just solved it as follows:
' <Asp:Repeater>
Private Sub rRSSChannels_Init(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Init
' Define rRSSChannels properties
With rRSSChannels
.DataSource = rRSSChannels_DataSource()
End With
' Define repeater item template
rRSSChannels.ItemTemplate = New rRSSChannelsTemplate(Me, ListItemType.Item)
End Sub
Private Sub rRSSChannels_Load(ByVal sender As Object, ByVal e As EventArgs) Handles rRSSChannels.Load
' Bind repeater to its data source
If Not IsPostBack Then
rRSSChannels.DataBind()
End If
End Sub
|
|
|
|
|
Hey, i'm trying to keep a list of all the users that are "logged in" to the site at a given time:
every time a user logs in, his username will be added to the list and when he presses the Sign out button his username will be deleted from the list.
the problem is that sometimes the user's session will be closed even if the user doesn't perform a "sign out" (session times out/user closes the browser).
how can i handle those 2 cases if they occour (make sure that the username will be deleted from the list).
in other words,the username should be deleted whenever the user's session close, even if he didnt press the sign out button!???
thanks,
Basheer N.
|
|
|
|
|
Hi,
you can use Session_End event to delete the record from the database.
Sushant Duggal.
|
|
|
|
|
Thx for the suggestion but it's not that simple, i've finally found a way to do it.
when a user signs in , i insert his sessionid and username into a list
when he signs out i delete his info from the online list by name
and when his session times out i delete the info by SessionId
the problem was that if he closes the window the user is still considered online and in case he opens the browser again, a new session will be made, i was trying to prevent two users with the same username logging in simltaniously, so the user had to wait until his previous session timed out even thought noone was using the username at the time, my way to do it , is to keep a cookie on his computer which will allow him to re login if he closes the browser and make a clean sign out:P
if anyone will need any help with somthing like this let me know by email
|
|
|
|
|
Hello,
I need to create a Data Object with fields: Url, Text, Link.
The data object will be used in my VB.NET code.
I want to use this data object to populate a GridView, DataList or Repeater.
I need to have 3 different columns:
- On the first column I need to place a custom control.
- On the second column I need to place a label.
- On the third column I need to place a hyperlink.
Could someone tell me which Data Object should I use?
And which Data Display control should I use?
And I need to do all this in runtime.
Please, send me any links, tips, ...
Thank You Very Much,
Miguel
|
|
|
|
|
This is really two different questions.
1 - you can create your data object with the properties you indicate (Url, Text, Link). You'll then probably want to create a collection class for it... it could be as simple as:
Class MyObjectCollection
Inherits List(of MyObject)
End Class I forget the exact syntax in VB.NET, but hopefully you see what I mean.
2 - to display your custom list, you could use a GridView, a DataList, a Repeater... any of them will work. You'll set its DataSource property to an instance of MyObjectCollection. If you're using a DataList or Repeater, you'll then define the appearance using a template. If you're using a GridView, you might be using TemplateField columns for the data display.
|
|
|
|
|
I have a bit of an odd situation, I have a complex asp.net form that loads in just under 3 seconds in FireFox, Opera and IE 6.
That's not the odd part, the odd part is that after it's visually loaded (I mean all controls rendered, not wait cursor, not activity showing in the browser window anywhere) I can immediately click on and use the controls in FireFox or Opera, but with IE there is a further 10 to 12 second delay after it's visually finished loading where you can't click on anything and the page just doesn't respond.
It's as if IE freezes for 10 seconds after it's done loading the page then unfreezes on it's own.
There is no wait cursor or anything to indicate it's not done fully loading.
Once the form is responsive in all browsers it's just as fast to use (there is some ajax in use etc).
The form has a large number of Telerik asp.net components on it and they are generally speaking very fast and bug free. However this does mean there is a fairly large amount of Javascript behind the form.
Where do I start with something like this to pin down the problem? Any tools I should look into?
Have any of you experienced anything similar with IE versus other browsers?
I know IE 6's javascript engine is slower, but 10-12 seconds versus no measureable time at all has got to indicate something badly out of whack somewhere.
|
|
|
|
|
Hi John. Are you sure it's not just an issue of caching?
|
|
|
|
|
yup, I cleared the cache on all three before testing, they load very fast. It's a mystery.
|
|
|
|