Strange error log in my websiteDear expert men,
My website have strange error but I could not find the reason. Please take a look about the error.
- Develop in ASP.Net Framework 2.0, and MS SQL database.
- Deploy with IIS version 7.5, SQL server 2008. IIS server and SQL server is a server.
- Normally it work properly but sometimes it could not work properly. I usually restart IIS and SQL server to ad-hoc fix or wait about 10 to 60 minutes without restart IIS and SQL server, after that time it work properly again.
- Trace the error log in my website I found that SQL exception return the message error did not match with sql query. Example:
>> SELECT GroupID from ST_User WHERE UserName = 'hieu' --> error message: Incorrect syntax near the keyword 'AND'
>> SELECT UserName From ST_User WHERE UserName = 'hieu' --> error message: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
>> SELECT IsActived FROM ST_User WHERE UserName = 'hieu' --> return 0 value but in database the value is 1
I have spent more time but could not find the reason to fix. Could any one please help me to find reason or the way to find reason.
Thanks a lot.