Re: VB.Net file access problem with UNC

From: Nick Malik [Microsoft] (nickmalik_at_hotmail.nospam.com)
Date: 01/02/05


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).
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: VB.Net file access problem with UNC
    ... Do you get an error message? ... Are you testing this by taking down the server, ... I can access it directly using UNC ... > server is restarted or goes off-line, my VB.net program crashes. ...
    (microsoft.public.dotnet.languages.vb)
  • VB.Net file access problem with UNC
    ... I need to access some data on a server. ... my vb.net program has problems with UNC. ... server is restarted or goes off-line, my VB.net program crashes. ... when the network server goes down using the same code below except that the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Virtual Directory to a remote UNC not working properly
    ... Read the NAS and IIS6 URL of my prior email. ... need to open more holes in the firewall to allow RPC and UNC ports as ... well as publish your flnas01 server to be accessible via the Internet. ...
    (microsoft.public.inetserver.iis.security)
  • Re: UNC file share and NTLM user identity
    ... Hi Michael, ... The "general' suggestion is to replicate your web content on each server. ... > UNC file share of a fail-over cluster is a natural choice ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: UNC Share causing Internal Server Error 500
    ... domain that the web server is not a member of. ... I found that ASP.NET requires that account to have permissions on the ... The UNC path is on DFS. ... IIS need to logon the 'Connect As' account and then use its credential to ...
    (microsoft.public.inetserver.iis.security)