You must Sign In to post a response.
  • Category: General

    Strange error log in my website

    Dear expert men,

    My website have strange error but I could not find the reason. Please take a look about the error.
    Website info:
    - 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.
    Error info:
    - 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.

    Hieu
  • #759352
    are these queries working properly when you type in the Sql-server. How do you know the errors are occurring in this Particular Query. I mean to say that the Error you wrote here against the query is not at all culprit some where around you are getting these errors. What are the Exceptional Handling Methods you used can you tell that.
    SRI RAMA PHANI BHUSHAN KAMBHAMPATI

  • #759955
    Dear Sri Rama,
    About your questions:

    1. are these queries working properly when you type in the Sql-server?
    - Yes, I tried copying these queries in SQL studio manager to test and they working property.

    2. How do you know the errors are occurring in this Particular Query? What are the Exceptional Handling Methods you used can you tell that?
    - I used try catch and write exception log message in the log file.

    I think the problem maybe in the communication between ISS server and SQL server but I could not find any ways to check. Please help me by your experiences.

    Thanks a lot


  • Sign In to post your comments