Click here to Skip to main content
15,888,113 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Execute javascript before page_Load Pin
jojoba201110-Nov-12 20:21
jojoba201110-Nov-12 20:21 
AnswerRe: Execute javascript before page_Load Pin
jkirkerx11-Nov-12 12:08
professionaljkirkerx11-Nov-12 12:08 
QuestionRe: Execute javascript before page_Load Pin
jojoba201111-Nov-12 17:24
jojoba201111-Nov-12 17:24 
AnswerRe: Execute javascript before page_Load Pin
jkirkerx11-Nov-12 18:28
professionaljkirkerx11-Nov-12 18:28 
QuestionLogin control doesn authenticate user after closing/changing database Pin
thes@int10-Nov-12 10:02
thes@int10-Nov-12 10:02 
AnswerRe: Login control doesn authenticate user after closing/changing database Pin
jkirkerx10-Nov-12 20:04
professionaljkirkerx10-Nov-12 20:04 
GeneralRe: Login control doesn authenticate user after closing/changing database Pin
thes@int10-Nov-12 22:11
thes@int10-Nov-12 22:11 
GeneralRe: Login control doesn authenticate user after closing/changing database Pin
jkirkerx11-Nov-12 11:32
professionaljkirkerx11-Nov-12 11:32 
That's much clearer than the previous explanation. I understood the first explanation, just sounded to me like the data input was malformed, so there was no match.

Well overall, connecting to a database is pretty straight forward, but does require a series of steps to make sure it works correctly, before writing 10K lines of code.

I just learned how to use Oracle 11.g, and it took me 3 days to figure the whole thing out from start to finish.

I can probably narrow down your problem, and can only condense it into a smaller format. The actual problem can be within a much larger scope of issues, ranging from connecting to actual table permissions.

Now you may think my post here is condescending, but it's designed to teach you how to fix your problem, because your always going to run into this every time you create a new SQL Server, no matter what brand it is.

CONNECT to table in the WebDev - OK
CONNECT to table in IIS - OK
UPDATE table - OK
SELECT from table - Fails

[Possible Solutions]
Double check your connection string

http://www.connectionstrings.com/sql-server-2012[connection string^]

In the WebDev [F5], security is relaxed, so connecting to a SQL Server on your development computer is easier.
Server=.\SQLExpress ;Database=myDataBase ;Trusted_Connection=True;

But in a production enviroment, if your SQL server is remote, and your not running in a windows domain, you should use SQL Authentication, which is a SQL user account just for that tablespace, and secure password. When you ran the setup for SQL Server, you had a choice for Windows Auth or Mixed Mode, you need Mixed Mode for web apps, well it's just easier to start with, and is pretty secure with strong passwords.
Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;


Next, check your tablespace permissions, your SQL user must be able to CONNECT, SELECT, UPDATE at the minimum. A tablespace is the database name in SQL Server.

Use a program like EMS SQL Manager Lite,to open your table, and use the SQL Tool to write a simple query, and execute it. The program will print the actual server response, which is the error message that caused the failure. In asp.net, you have to capture that error using catch.
SELECT COUNT(*) FROM schema.tablename WHERE accountName = 'testName'

Check your results, you should get a value of 1

If that all works, write a function that does the same thing, and walk through it to make sure you get the same value in your project.

Now if that works fine, the error is now isolated down to your login program. You'll need to walk through the program code using F5 and make a break point using F9, and step through the database code using F11, examine the username and password buffers all the way through the journey, and make sure that the values are valid right up to the database execute query, and then check for any error messages.

Basically I think your either writing or reading bad data, or your user does not have permission to read the data.

If you bound the wizard control to a table, There might be a mistake somewhere, so you have to narrow it down.

[edit]

It doesn't matter that you have 2 databases to anyone but you. You have to fix the first database of choice, and when that is fixed, fix the second one, then both will work correctly.
GeneralRe: Login control doesn authenticate user after closing/changing database Pin
thes@int13-Nov-12 2:14
thes@int13-Nov-12 2:14 
GeneralRe: Login control doesn authenticate user after closing/changing database Pin
jkirkerx13-Nov-12 6:57
professionaljkirkerx13-Nov-12 6:57 
QuestionIt takes too long to execute a query in aspx page Pin
Abdul Rahman Hamidy9-Nov-12 20:10
Abdul Rahman Hamidy9-Nov-12 20:10 
AnswerRe: It takes too long to execute a query in aspx page Pin
jkirkerx10-Nov-12 19:58
professionaljkirkerx10-Nov-12 19:58 
GeneralRe: It takes too long to execute a query in aspx page Pin
David Mujica13-Nov-12 3:53
David Mujica13-Nov-12 3:53 
QuestionProblem with MapPageRoute Pin
Jassim Rahma9-Nov-12 8:50
Jassim Rahma9-Nov-12 8:50 
AnswerRe: Problem with MapPageRoute Pin
fjdiewornncalwe9-Nov-12 9:46
professionalfjdiewornncalwe9-Nov-12 9:46 
GeneralRe: Problem with MapPageRoute Pin
Jassim Rahma9-Nov-12 9:50
Jassim Rahma9-Nov-12 9:50 
Question{36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80010001 Call was rejected by callee. Pin
Member 95859818-Nov-12 23:55
Member 95859818-Nov-12 23:55 
AnswerRe: {36D27C48-A1E8-11D3-BA55-00C04F72F325} failed due to the following error: 80010001 Call was rejected by callee. Pin
jkirkerx10-Nov-12 20:09
professionaljkirkerx10-Nov-12 20:09 
QuestionHi friends i want to create a web application Pin
VinothData8-Nov-12 23:52
VinothData8-Nov-12 23:52 
Questionlarger file uploading issue Pin
silentspeaker8-Nov-12 3:17
silentspeaker8-Nov-12 3:17 
QuestionUnable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream' Pin
silentspeaker8-Nov-12 1:55
silentspeaker8-Nov-12 1:55 
AnswerRe: Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream' Pin
Richard Deeming8-Nov-12 2:26
mveRichard Deeming8-Nov-12 2:26 
GeneralRe: Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream' Pin
silentspeaker8-Nov-12 2:34
silentspeaker8-Nov-12 2:34 
GeneralRe: Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream' Pin
Richard Deeming8-Nov-12 2:44
mveRichard Deeming8-Nov-12 2:44 
QuestionWCF Pin
sandeep81467-Nov-12 22:42
sandeep81467-Nov-12 22:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.