Wednesday, March 28, 2012
System.IO.IOException
Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
Our project was also converted in Visual Studio to 1.1
Since we have uploaded the project, we are getting an error with one of our
pages which is trying to read a list of files from a network share and
populate a dropdownlist.
The error is:
System.IO.IOException: The specified network name is no longer available.
OR
System.IO.IOException: The specified network password is not correct.
The code is:
Dim fileEntries As String() = Directory.GetFiles(targetDirectory)
where targetdirectory is "\\192.168.1.1\data\General\Documents\"
If we try to view the page on our own machines ie http://localhost the page
works fine!!
So is there any fixes/ideas why this is happening!!
Thanks!How would you get TWO different error messages from the same code?
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.
"Krissy" <krissi___@.hotmail.com> wrote in message
news:3f27704b@.quokka.wn.com.au...
> Hi all,
> Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
> Our project was also converted in Visual Studio to 1.1
> Since we have uploaded the project, we are getting an error with one of
our
> pages which is trying to read a list of files from a network share and
> populate a dropdownlist.
> The error is:
> System.IO.IOException: The specified network name is no longer available.
> OR
> System.IO.IOException: The specified network password is not correct.
>
> The code is:
> Dim fileEntries As String() = Directory.GetFiles(targetDirectory)
> where targetdirectory is "\\192.168.1.1\data\General\Documents\"
>
> If we try to view the page on our own machines ie http://localhost the
page
> works fine!!
> So is there any fixes/ideas why this is happening!!
> Thanks!
"Kevin Spencer" <kevin@.takempis.com> wrote in message
news:ONRU7dpVDHA.2316@.TK2MSFTNGP09.phx.gbl...
> How would you get TWO different error messages from the same code?
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> http://www.takempis.com
> Complex things are made up of
> lots of simple things.
> "Krissy" <krissi___@.hotmail.com> wrote in message
> news:3f27704b@.quokka.wn.com.au...
> > Hi all,
> > Yesterday we upgraded our server to the 1.1 Framework. (from 1.0)
> > Our project was also converted in Visual Studio to 1.1
> > Since we have uploaded the project, we are getting an error with one of
> our
> > pages which is trying to read a list of files from a network share and
> > populate a dropdownlist.
> > The error is:
> > System.IO.IOException: The specified network name is no longer
available.
> > OR
> > System.IO.IOException: The specified network password is not correct.
> > The code is:
> > Dim fileEntries As String() = Directory.GetFiles(targetDirectory)
> > where targetdirectory is "\\192.168.1.1\data\General\Documents\"
> > If we try to view the page on our own machines ie http://localhost the
> page
> > works fine!!
> > So is there any fixes/ideas why this is happening!!
> > Thanks!
If I knew that then I wouldn't have the problem ;)
Tuesday, March 13, 2012
System.Security.SecurityException: Request failed.
i have uploaded a web site on a server and it is runnig but
when i try to access those pages on which i have coded to get data form ms access databae i received the following error
how can i correct this problem
the error is as following
Server Error in '/' Application.
Security Exception
Description:The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details:System.Security.SecurityException: Request failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Stack Trace:
[SecurityException: Request failed.] Data.createsession.startsession(String name, String password) +0 RUGUI.admin1.Button1_Click(Object sender, EventArgs e) in admin.aspx.vb:35 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +2112 System.Web.UI.Page.ProcessRequest() +218 System.Web.UI.Page.ProcessRequest(HttpContext context) +18 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179 System.Web.HttpApplication.ExecuteStep
Does the ASPNET user, which ASP.NET runs under, have permissions to the Access database?
NC...
Your site is working in a medium trust or even low.
If you are hosting the site with a company then you have to ask them to increase the trust level. If you are running this in your server, then you should know that when you use OLD DB, this is out of the medium trust privileges. You can get that working with some modifications in the maching.config and web.config if you are using ASP.NET 2.0
Check the following articles at servertastic
http://www.servertastic.com/articles/category/aspnet/
Let me know if you need further info
Regards