Admin
|
 |
 |
| Присоединился: 18 Mar 2003 |
| Число сообщений: 36 |
| |
|
Admin Tab Problem
Отправлено: 18 Mar 2003 07:15 PM |
Hi @ ALL
I have today downloades the File ASPNETPortal_1[1].0.3.zip from www.ibuyspyworkshop
and Installed it on a fresh database and into a fresh Folder.
After Installation I logged on as SUPER and want to navigate to the ADMIN Tab.
I got the following Error
can anyone Help me out ??
Thanks in advance
Alexander
[email protected]
------------ ERROR MESSAGE ----------------
Server Error in '/ASPNETPortal' Application.
--------------------------------------------------------------------------------
Error converting data type nvarchar to datetime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Error converting data type nvarchar to datetime.
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:
[SqlException: Error converting data type nvarchar to datetime.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +44
ASPNetPortal.AdminDB.GetSiteLog(Int32 PortalId, String PortalAlias, Int32 ReportType, String StartDate, String EndDate) +433
ASPNetPortal.SiteLog.BindData() +234
ASPNetPortal.SiteLog.Page_Load(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.510; ASP.NET Version:1.1.4322.510 |
//Igor
|
|
|
|
Admin
|
 |
 |
| Присоединился: 18 Mar 2003 |
| Число сообщений: 36 |
| |
|
Re: Admin Tab Problem
Отправлено: 18 Mar 2003 07:16 PM |
| The problem is likely to do with the SiteLog.ascx and how it deals with date localization. The control passes Date.Today & " 23:59" to the GetSiteLog stored procedure. I am guessing that the value for Date.Today is creating a date format which SQL Server cannot interpret. This is likely due to your regional settings. |
//Igor
|
|
|
|
Admin
|
 |
 |
| Присоединился: 18 Mar 2003 |
| Число сообщений: 36 |
| |
|
Re: Admin Tab Problem
Отправлено: 18 Mar 2003 07:16 PM |
Hi !
I didn't change anytging on my machine. I got it working!
Can you please tell me what settings are tested or what I have to configure
so that it works.
My time Zone is set to W. Europe Standard Time.
The only change I did are a join to a AD-Domain nothing else.
Coulöd this be the Problem??
My machine is a Windows XP Pro with SP1 and the Framework 1.1
With the Indsallation of Sql2K an older version was running correctly.
Do you have an Idea what to do??
Thanks for your help
Alexander
[email protected] |
//Igor
|
|
|
|
Admin
|
 |
 |
| Присоединился: 18 Mar 2003 |
| Число сообщений: 36 |
| |
|
Re: Admin Tab Problem
Отправлено: 18 Mar 2003 07:17 PM |
Hi Alexander et al
I believe that the problem you have is due to the SQL Server stting being set to the default language of ENGLISH. This should probably be AMERICAN.... lol.
Before you change the setting first shut down the portal.
Next Open SQL Server Enterprise Manager.
Expand a server group.
Right-click a server, and then click Properties.
Click the Server Settings tab.
In the Default language for user box, choose the language in which Microsoft® SQL Server™ should display system messages.
The default language is English.
Now scroll up to find BRITISH ENGLISH and select that option.
Exit out of SQL Server.
Reload your portal and , hopefully things should be fine, you may however get a General network error page. If this happens then try refreshing the page.
Now log in a SUPER or any other user and all is well.
Regards
|
//Igor
|
|
|
|
Admin
|
 |
 |
| Присоединился: 18 Mar 2003 |
| Число сообщений: 36 |
| |
|
Re: Admin Tab Problem
Отправлено: 18 Mar 2003 07:17 PM |
Hi again,
after testing with different configurations and checking with SQL Profiler and Query Analyzer I have an running system. My Solution:
- W2K with SP3, english version, regional settings: german (default input locale: german)
- SQL Server 2000, SP3, english version, language setting for the ASPNETPortal user: german
(ASPNETPortal user is the user you configured in the web.config file)
Some additional informations:
The datetime value is passed to the procedure GetSiteLog as NVARCHAR (in my case: german format). The SP parameters for the starting / ending date have data type datetime. Because of that, SQL Server converts the NVARCHAR values in a DATETIME format. For this conversion SQL Server uses the connection specific language settings. If this is english (as in my first steps) you will receive the conversion error (and this is correct: he expects an english formatted datetime and gets an german one). After changing the language settings for the ASPNETPortal user he converts the date in the right way.
You can check this behaviour in Query Analyzer with the statement SET DATEFORMAT dmy. This sets the connection specific language setting (in my case to dd.mm.yyyy) and the procedure call works.
SQL Profile is every time a good tool to look for the sql statements that are send from the portal to SQL Server.
An alternative way may be to change the os regional settings only for ASPNET user. But i didn't check that.
Hope that helps others to configure a running system.
Tom |
//Igor
|
|
|
|