Problem with Calander Control Day Render Event

  • Thread starter Thread starter Billy Jacobs
  • Start date Start date
B

Billy Jacobs

I am using the Day Render Event to place a red * on each
day where there is at least one event. This works fine on
my local machine. It however does not work on the
production server. The following is my code:

I even tried it removing the if completely. Just writing
the literal control to every cell no matter what and that
did not work on the production server either.

Please help. P.S. I know I have uploaded the code
correctly because other changes I have made appear
correctly.

Here is my code.

Private Sub cldActivityDate_DayRender(ByVal sender As
System.Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles
cldActivityDate.DayRender
Dim dr() As DataRow
Dim r As DataRow
Try
dr = CType(Session("dsLAStateData"),
dsLAStateData).Iteneraries.Select("EmployeeID=" & CType
(Session("UserInfo"), UserInfo).ID)
For Each r In dr
If r.Item("Activity Date") = e.Day.Date
Then

e.Cell.Controls.AddAt(1, New
LiteralControl("<font color=red>*</font>"))
'e.Cell.Controls.AddAt
(e.Cell.Controls.Count - 1, New LiteralControl("<font
color=red>*</font>"))
Exit Sub
End If
Next
Catch ex As Exception
lblError.Text = ex.Message & " in
cldActivityDate_DayRender"
End Try
End Sub
 
Hi Billy,

I built a test Web application, and it works properly on my side. I think
more information is needed before moving forward:

1. Do you receive any error message or exception when it fails to work on
the production server?

2. Please compare the version of .NET Framework installed on your local and
production machine. I recommend you check the version of System.Web.dll and
aspnet_isapi.dll. I'd like to perform the following steps to check
aspnet_isapi.dll:

a. Go to "Control Panel" -> "Administrative Tools" -> "Internet Services
Manager".
b. Right click "Default Web Site", select "Properties".
c. Select the "Home Directory" panel, click "Configuration".
d. Double-click the ".aspx" extension and you can see where
aspnet_isapi.dll locates, for example:
C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll

Note: v1.0.3705 is the version of .NET Framework.

I look forward to hearing from you.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Well, I installed the .net framework 1.1 myself on the production
server. I downloaded it from Microsoft Downloads about 3 weeks ago.
Previously this server did not have the .net framework installed.

Also, I am sure my code would not even run on the production server if
it did not have the framework 1.1 installed. I would get a missing file
error if 1.0 was installed.

The code works correctly on my laptop but does not draw the * on the
calendar on the production server.

On the production server I get no errors and everything else functions
correctly.

Billy Jacobs
Software Engineer
 
Hello Billy,

Thanks for your update. I tested on both .NET Framework 1.0 and 1.1
systems, and I am not able to reproduce hte problem on my side.

Could you tell me the version of .NET Framework installed on your local
machine? Which version of Visual Studio .NET you are using to build the web
application, VS .NET 2002 or VS .NET 2003?

What file is missing if the web application is running under .NET Framework
1.0?

I am standing by for your reply.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Development Machine:
1. VS.net 2003
2. O/S Windows XP Professional
3. .Net Framework 1.1
4. Automatic Updates
5. DB-Backend SQL Server 2000

Production Server
1. O/S Windows 2000
2. .Net Framework 1.1
3. Automatic Updates
4. DB-Backend SQL Server 2000

Development Machine:
The calendar draws the red astericks (*) correctly on the appropriate
calendar days.

Production Server:
The red astericks do not display. I have tried text and other characters
as well with no luck. If I look at the html source produced by the
server and rendered on the client, there are no *. It is as if it is not
even executing the day render event.

I get no errors and everything else functions correctly.

Billy Jacobs
Software Engineer

Billy Jacobs
Software Engineer
 
Hello Billy,

I built a test system o the same with your production server, however, it
works properly.

Did your systems (both Development and Production) access the same SQL
Server? I suspect that your production server may not get proper DataRow
returned so that the corresponding e.Cell.Controls.AddAt() was not called.
Please check whether this is possible, and I also recommend you debug the
Web application of your Production Server.

I look forward to your result.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Your assumption is not the problem.

I have tried writing to the calendar on the DayRender Event for every
day without any data access, just to see if it would work, and it does
not.

Again, it works on my machine but not on the production server.

If you like, you can create a test page with a calendar control and code
to write info in the DayRender event and I can place it on the server
and give you the url to see it.

Also, is there a way I can Remotely step through the code running on the
server?


Billy Jacobs
Software Engineer
 
Hello Billy,

Thanks for your resposne. This issue seems strange, and you may have to
debug the application remotely. Please configure remote debugging per MSDN
article below:

Introduction to Web Application Debugging
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconIntroductionToWebApplicationDebugging.asp

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Back
Top