|
I have created a window service which accesses a folder on a seperate system and writes a file into it.
Everyone has been granted access on that folder
Now when i install service with user account it is able to create file into it,
but when i install service with either local system,local service or network service it is anot able to write file into it. it says "Access denied" to that folder.
Is there a way that i can write file into that folder with either local system,local service or network service.
Since i have tried with all possible right granted to that folder.
|
|
|
|
|
"everyone" does not include IUSR/IWAM/ASP.NET
try giving asp.net user write access to that folder (if it still fails try iusr/iwam also)
|
|
|
|
|
I have a window service which is accessing a shared folder on another server.
how does ASP.Net user will solve this problem as it is for IIS.
Also i want to access folder by installing services with "Local System" status
|
|
|
|
|
My apologies...I misread window service as webservice. you can use impersionation. have the window service logon as someone that does have access or falls under the group everyone when writing to the shared folder...
|
|
|
|
|
I have impersonated using WMI,
and while checking directory i use
system.io.Directory.Exists("Shared folder path")
it gives me exception "Access Denied" cause when i register service as Local System it uses Local system a/c to get access to the folder and that's why it says "Access Denied"
but when i Register it with User account it uses that a/c to get access which is in Everyone.
The work around is that register the service with User a/c but how to access folder with service registered "Local system"
|
|
|
|
|
sorry i explained the query wrong. i need to use a button to replace the selected item with the one above, and do the same with the one below. i suppose this code could be modified a bit but dont know how. can anyone help me please.
Select Previous:
ListBox1().SelectionMode = SelectionMode.One
If Me.ListBox1.SelectedIndex > 0 Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex - 1
End If
Select Next:
ListBox1().SelectionMode = SelectionMode.One
If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
End If
|
|
|
|
|
Stop spamming.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
oh i think i understand, you want the selected item on button press to have the same value as the next or previous item.
If that is the case:
Make sure your listbox selectionmode = selectionmode.multiextended
Select all:
ListBox1().SelectionMode = SelectionMode.MultiExtended<br />
For i As Integer = 0 To Me.ListBox1.Items.Count - 1<br />
Me.ListBox1.SetSelected(i, True)<br />
Next
Change current to same as previous:
ListBox1().SelectionMode = SelectionMode.One<br />
Dim Selected As Integer = Me.ListBox1.SelectedIndex<br />
Dim newItem As String<br />
<br />
If Me.ListBox1.SelectedIndex > 0 Then<br />
newItem = Me.ListBox1.Items.Item(Selected - 1)<br />
Me.ListBox1.Items.RemoveAt(Selected)<br />
Me.ListBox1.Items.Insert(Selected, newItem)<br />
Me.ListBox1.SelectedIndex = Selected<br />
End If
Change current to same as next:
ListBox1().SelectionMode = SelectionMode.One<br />
Dim Selected As Integer = Me.ListBox1.SelectedIndex<br />
Dim newItem As String<br />
<br />
If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then<br />
newItem = Me.ListBox1.Items.Item(Selected + 1)<br />
Me.ListBox1.Items.RemoveAt(Selected)<br />
Me.ListBox1.Items.Insert(Selected, newItem)<br />
Me.ListBox1.SelectedIndex = Selected<br />
End If
Posted by The ANZAC
|
|
|
|
|
I want to be able to click only on the childs and not the roots in a treeview. Is this possible and if it is can somebody please explain to me how to do it. Thank You!
|
|
|
|
|
If you click only on child nodes how will you ever be able to use the expand/collapse feature of treeviews? This is one of the advantages of using a treeview.
Not saying it's impossible, just think it's a bit weird. What exactly are you trying to do? Maybe I can help.
|
|
|
|
|
I have a datagridview in which I have a list of items some of which are priced in Dollars and some in sterling is there any way to format the columns accordingly.
I have a second column which can be used to pick the currency up from eg.
Roller skates 22.40 USD
Fishing Rod 34 GBP
what I would like to see is
Roller skates $22.40 USD
Fishing Rod £34.00 GBP
I can format the Whole column if they are the same currency using
.CellTemplate.Style.Format = "C2"
I assume this picks up the default currency? If I can alter the currency Symbol for an individual cell then I'm Ok.
Thanks for any help
|
|
|
|
|
Hi
I'm populating an xml file from a dataset. There are some columns that sometimes don't have a value. The problem is that those column names don't appear in the xml file when they don't have a value. How do I get those columns to still appear in the xml file and not be ignored?
Thanks,
RainFox - cunning, with some cloudy clueless moments, yet cool and fresh
|
|
|
|
|
sorry i explained the query wrong. i need to use a button to replace the selected item with the one above, and do the same with the one below. i suppose this code could be modified a bit but dont know how. can anyone help me please.
Select Previous:
ListBox1().SelectionMode = SelectionMode.One
If Me.ListBox1.SelectedIndex > 0 Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex - 1
End If
Select Next:
ListBox1().SelectionMode = SelectionMode.One
If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1
End If
|
|
|
|
|
Continue in the same thread instead of creating a new one.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
i am creating a notepad in vs05 and i am trying to display the name of the file at the top of the screen when i open a file from desktop. this is the code i've got so far, instead of the file name it displays openfiledialog1. this is very anoying, any help would be appreciated. thanks
this is code i got:
Dim name As String = OpenFileDialog1.FileName
With OpenFileDialog1
.Title = "select file"
.InitialDirectory = "U:\MyDocuments"
.DefaultExt = "rtf"
.Filter = "rich text files(*.rtf)|*.rtf"
.FilterIndex = 1
End With
OpenFileDialog1.ShowDialog()
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
rtb1.LoadFile(OpenFileDialog1.FileName)
Else
MsgBox.show("unknown error during file read")
End If
Me.Text = name
|
|
|
|
|
Replace Me.Text = name with Me.Text = OpenFileDialog1.FileName.
Actually, you would be better writing this section like this:
Dim fileName As String
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
fileName = OpenFileDialog1.FileName
End If
If fileName <> String.Empty Then
rtb1.LoadFile(fileName)
Me.Text = fileName
End If
Don't tell somebody that there was an unknown error just because they clicked Cancel in a dialog box. It is bad form.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am trying to export a crystal report to excel format in aspx page using vb as the code behind. I have published the crystal report in the BusinessObjects server and loading in the page load event. I can able to load the crystal report using the below code,
<br />
Dim mySessionMgr As SessionMgr = New SessionMgr<br />
Dim myEnterpriseSession As EnterpriseSession = mySessionMgr.Logon(uname,pwd,servername, AuthType)<br />
Dim myEnterpriseService As EnterpriseService = myEnterpriseSession.GetService("InfoStore")<br />
Dim myInfoStore As InfoStore = New InfoStore(myEnterpriseService)<br />
myEnterpriseService = myEnterpriseSession.GetService("PSReportFactory")<br />
Dim psrfObject As Object = myEnterpriseService.Interface<br />
Dim myPSReportFactory As PSReportFactory = CType(psrfObject, PSReportFactory)<br />
Dim queryString As String = "Select SI_ID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS " _& "Where SI_KIND='CrystalReport' and SI_INSTANCE=0 " _<br />
& "And SI_NAME = 'Report1'"<br />
Dim myInfoObjects As InfoObjects = myInfoStore.Query(queryString)<br />
Dim myInfoObject As InfoObject = myInfoObjects(1)<br />
Dim myReportSource As ReportSource = myPSReportFactory.OpenReportSource(myInfoObject.ID)<br />
<br />
Session("my_rptsrc") = myReportSource<br />
CrystalReportViewer1.ReportSource = myReportSource <br />
But the export options is not working for the instance of my report(myReportSource)
<br />
Dim myExportOptions As New CrystalDecisions.Shared.ExportOptions<br />
Dim myDiskFileDestinationOptions As CrystalDecisions.Shared.DiskFileDestinationOptions<br />
Dim myExportFile As String = "Report1.rpt"<br />
myDiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions<br />
myDiskFileDestinationOptions.DiskFileName = myExportFile<br />
<br />
myExportOptions = myReportSource.ExportOptions<br />
I need to get the export options as in the above code but i m not able to get that(Export option is not available for the instance).
<br />
With myExportOptions<br />
.DestinationOptions = myDiskFileDestinationOptions<br />
.ExportDestinationType = .ExportDestinationType.DiskFile<br />
.ExportFormatType = .ExportFormatType.Excel<br />
End With<br />
myReportSource.Export()<br />
In the above line also export function is not available for the instance myReportSource.
<br />
Response.ClearContent()<br />
Response.ClearHeaders()<br />
Response.ContentType = "application/ms-xls"<br />
Response.WriteFile(myExportFile)<br />
Response.Flush()<br />
Response.Close()<br />
I need help regarding this....
|
|
|
|
|
i am creting a playlist in vb.net and i need to create a few buttons that select all the items in a list and two further buttons to select the item above and item below. can anyone tell me how i would go about that.
|
|
|
|
|
For listbox:
Select All: It is necessary to switch modes on select all
ListBox1().SelectionMode = SelectionMode.MultiSimple<br />
For i As Integer = 0 To Me.ListBox1.Items.Count - 1<br />
Me.ListBox1.SetSelected(i, True)<br />
Next
Select Previous:
ListBox1().SelectionMode = SelectionMode.One<br />
If Me.ListBox1.SelectedIndex > 0 Then<br />
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex - 1<br />
End If
Select Next:
ListBox1().SelectionMode = SelectionMode.One<br />
If Me.ListBox1.SelectedIndex < Me.ListBox1.Items.Count - 1 Then<br />
Me.ListBox1.SelectedIndex = Me.ListBox1.SelectedIndex + 1<br />
End If<br />
Posted by The ANZAC
|
|
|
|
|
thanks alot matey thats a great help to my cause. much apreciation
|
|
|
|
|
Hi,
I am generating a report in VB.NET.The report is displayed in a grid format.When i preview the print of the report, i can only see half of the grid columns and so the print contains only few columns. Can any1 tell me how i can view all the columns of the grid in the report.I want the print to have all the columns in the same page.
Thanks,
Riz
|
|
|
|
|
Hi, i m now doing my final year project in designing a web page that provide video conferencing service. this service allowed the user to chat face-to-face by using this video conferencing through Internet n webcam.
Please, some one else o anyone can provide me the source code solution in Visual Basic.net 2005 in designing this service.
I m very appreciate for your helping n thank U very much!
|
|
|
|
|
|
Hi..
Im not sure if im posting in correct place. if so please tell me..
however i need to assistance with something to do with VB Express 2005 using
MDB back end database. I have just set a password on my MDB DB and now need to let VB express in Database Explorer where I modify the connection what the password is... but after doing so and set the password in the connection
i get a NOT A VALID PASSWORD when executing my app.
Please help
Robbo
|
|
|
|
|
Make sure your connection string is setup correctly. This site is a good reference for that: http://www.connectionstrings.com[^]
If it is correct, make sure your user and password are the correct letter case (if your user/password is all lower case, make sure it is lower case in your connection string too)
Hope this helps.
|
|
|
|