Re: VB.Net file access problem with UNC
From: Nick Malik [Microsoft] (nickmalik_at_hotmail.nospam.com)
Date: 01/02/05
- Next message: Ken Tucker [MVP]: "Re: Align a string on Decimal"
- Previous message: Jm: "Re: Rounding"
- In reply to: Sarah: "Re: VB.Net file access problem with UNC"
- Next in thread: Sarah: "Re: VB.Net file access problem with UNC"
- Reply: Sarah: "Re: VB.Net file access problem with UNC"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 02 Jan 2005 03:52:53 GMT
First off, if you can't see the error, you can't address it.
Turn off "auto reboot on system crash" on your XP client.
http://www.theeldergeek.com/auto_reboot_on_system_crash.htm
Also, if you haven't installed XP SP2 yet, do it now. Your problem may
already have been fixed.
An error in a .net app should never crash a system. In fact, I'm not sure
your app is actually causing the system crash.
Have you checked the error log?
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Sarah" <sarah.nntp@powertechcanada.com> wrote in message
news:f7IBd.42994$KO5.14316@clgrps13...
> "Nick Malik [Microsoft]" <nickmalik@hotmail.nospam.com> wrote in message
> news:eLGBd.316849$HA.295458@attbi_s01...
> > what do you mean by "crashes?"
> > Do you get an error message?
>
> No error message - VB.Net program on Windows XP crashes and reboots
> immediately
>
> >
> > How big are these files? Do they take more than 10 seconds to copy from
> one
> > place to another?
>
> No, only a fraction of a second.
>
>
> >
> > Are you testing this by taking down the server, or does this just happen
> > without intervention? If the latter, how often?
> >
>
> I've done tests by taking down the server. But, in the production
> environment, this server goes through a number of reboots under normal
> operations daily.
>
> > I'm wondering if you aren't attempting to execute the timed code while
it
> is
> > still running from the previous tick?
> >
>
>
> I've disabled the timer during the tick - so, that is not happening.
>
> > --
> > --- Nick Malik [Microsoft]
> > MCSD, CFPS, Certified Scrummaster
> > http://blogs.msdn.com/nickmalik
> >
> > Disclaimer: Opinions expressed in this forum are my own, and not
> > representative of my employer.
> > I do not answer questions on behalf of my employer. I'm just a
> > programmer helping programmers.
> > --
> > "Sarah" <sarah.nntp@powertechcanada.com> wrote in message
> > news:uADBd.41512$KO5.40042@clgrps13...
> > > I need to access some data on a server. I can access it directly using
> UNC
> > > (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped
network
> > > drive resource (S:\Path\FileName).
> > >
> > > Here is my problem: my vb.net program has problems with UNC. If the
UNC
> > > server is restarted or goes off-line, my VB.net program crashes. The
> code
> > > for UNC access to the file is included below and is put in the tick
> event
> > of
> > > a form timer control running every 10 seconds. The program does not
> crash
> > > when the network server goes down using the same code below except
that
> > the
> > > network resource is referenced using a mapped drive (i.e. S:\).
> > >
> > > =======
> > >
> > > Try
> > >
> > > If File.Exists("\\Server1\Files\Data1.dbf") Then
> > >
> > > Try
> > > File.Copy(("\\Server1\Files\Data1.dbf",
> > > "C:\Data\tblData.dbf", True)
> > > Catch
> > > 'Do Nothing
> > > End Try
> > >
> > > End If
> > >
> > > Catch
> > >
> > > 'msgbox error
> > >
> > > End Try
> > >
> > > =======
> > >
> > > The reason I would prefer to use UNC is so that the drive does not
have
> to
> > > be mapped on the clients computer - and the client cannot goof around
> with
> > > the server files that easily (I do not have the ability to modify
> > > permissions in this situation at all).
> > >
> > > Note: the program only crashes after the program has been running for
a
> > > while (i.e. after multiple ticks). So, I'm guessing that if it is in
the
> > > middle of a check and the server goes down, then it crashes. Because,
if
> > you
> > > put an invalid UNC path and start up the program, it handles that
> without
> > a
> > > problem ( i.e. no crashes, just runs every 10 seconds).
> > >
> > >
> >
> >
>
>
- Next message: Ken Tucker [MVP]: "Re: Align a string on Decimal"
- Previous message: Jm: "Re: Rounding"
- In reply to: Sarah: "Re: VB.Net file access problem with UNC"
- Next in thread: Sarah: "Re: VB.Net file access problem with UNC"
- Reply: Sarah: "Re: VB.Net file access problem with UNC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|