WORKS IN TEST, NOT IN LIVE????

G

Guest

Hey guys,

I just wrote a web page form using C#/.NET. It works perfectly in the
"test" environment that Visual Studio 2005 sets up for you when you attempt
to run your web based application.

However, as soon as I make it live, it stops working. The ON-FORM-LOAD event
does work. Specifically what my problem is, is that data dissapears. I have
two listboxes. The listbox on the left is populated with names of people. I
have a button in between them that allows you to re-assign those names to the
OTHER list box.

When I run it in the local environment, it correctly copies the names to the
other list box. BUT!!! When I run it through IIS (accessing it's web page),
when I click the re-assign button, BOTH listboxes suddenly become empty, as
well as one of my drop-down boxes. None of my text fields become blank though.


What am I forgetting to do???


Thanks!

Todd
 
G

Guest

It sounds to me like your button click is creating a postback and the
databound listboxes aren't getting re - "databound" on the page reload, so
they show up empty. ViewState on a postback doesn't restore the data that was
bound to a control, only changes in the state.

Why it would work in development and not in production though, is beyond me.

Hope that helps
Peter
 
R

Richard

Todd,
When I run it in the local environment, it correctly copies the names to the
other list box. BUT!!! When I run it through IIS (accessing it's web page),
when I click the re-assign button, BOTH listboxes suddenly become empty, as
well as one of my drop-down boxes. None of my text fields become blank though.

This could be for a number of reasons. IIS is a mine field sometimes and
it has taken me some years to understand it!

1) Check that the either the ASPNET [Windows 2000] or NETWORK SERVICE
[Windows 2003] user has access to your datasource.

2) Note that you can run both .NET 1.1 and .NET 2.0 [web] applications
on the same server but that they must run in different app pools.

Not sure if this will help, but it's worth checking.

Regards,

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top