Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Settings
Message
From
26/10/2006 10:39:50
 
General information
Forum:
ASP.NET
Category:
Security
Title:
Miscellaneous
Thread ID:
01164524
Message ID:
01164713
Views:
12
Hmmm ... where is the server you're trying to access? Is it on your PC or elsewhere?

~~Bonnie



>Actually, I haven't touched it for a month which means NOTHING changed. (Unless someone else did and didn't tell me) I was about to start back on it and was simply running it to see where I had left off. In that time, Microsoft put out a security patch for .NET 2.0 which was downloaded and installed. Could that be the change?
>
>APP_CONNECTIONSTRING = "Persist Security Info=True;Initial Catalog=CBCManage;"
>
>In case it matters, this is SQL Server 2000.
>
>
>
>
>>OK, so if it was working a month ago, something must have changed ... any idea what might have changed between now and a month ago? What's in CBCManager.Properties.Resources.APP_CONNECTIONSTRING?
>>
>>~~Bonnie
>>
>>
>>
>>>This is a Windows Forms application.
>>>
>>>Okay, I'm at a loss over this error:
>>>
>>>Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
>>>
>>>This is the code it says is causing the problem:
>>>
>>>frmLogin is simply a login form. Line with -> is the line with the error.
>>>
>>>oSQLConnection.ConnectionString =
>>>	CBCManager.Properties.Resources.APP_CONNECTIONSTRING +
>>>	"Data Source=" + frmLogin.ServerName.Trim() +
>>>	";User ID=" + frmLogin.UserName.Trim() +
>>>	";Password=" + frmLogin.Password;
>>>
>>>	try
>>>	{
>>>	oSQLConnection.Open();	//Attempt the connection
>>>	}
>>>
>>>	catch(SqlException oException)	// Fails-need to know why
>>>	{
>>>	     switch(oException.Number)
>>>	     {
>>>		// Invalid password/username
>>>		case 18456:
>>>		MessageBox.Show("Invalid User ID or password.");
>>>		break;
>>>
>>>		default:
>>>		{
>>>		MessageBox.Show(this.ShowSQLError(oException));
>>>		break;
>>>	        }
>>>	     }
>>>	     blnLoginError = true;	// Some error doesn't matter what
>>>	}
>>>
>>>	catch
>>>	{
>>>->	     throw;
>>>	}
>>>
>>>	finally	// we want to insure it loops back to the
>>>        {
>>>	blnLoginSuccess = !blnLoginError;
>>>	}
>>>
>>>
>>>This was working just a month ago, now I'm getting this error. What causes things like this and how do I get rid of them? I did not use the ClickOnce thing. Do I need to?
>>>
>>>When I first tried a test app with .NET, I got a similar error. I rebuilt it from scratch without using ClickOnce to get rid of it. I've gotten too far on this to go back to the drawing board.
>>>
>>>Richard
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform