473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem with custom web server control

I need help diagnosing an error that occurs on the web server where my
web site is hosted, but
it does not occur when I run it under VS2005. I have an errors.aspx
page that captures unhandled application errors. The error I get from
Server.GetLastError() is:
"The server cannot fulfill your request."

Scenario: I developed a composite web server control in C# . It is on
a web page in an ASP project I developed with VB as the language. The
web server control has a Close button that I have wired to
the onclick event to raise the "CloseClick" event in the web page,
which pops a messagebox asking user if they want to save changes. This
works on a local machine under VS2005, but on the server that is
hosting the application, when I click the Close button I get the above
mentioned error. I am using one of those virtual hosting companies.
This is a personal project; I do not have servers to test things on,
just my local pc.

I am not sure if it is my code, the configuration on the webserver, or
how to diagnose the problem. I extracted the pertinent parts of the
code for the Close button -there are several controls and other
buttons, but the close button is the only control that causes raises
an event on an .aspx page.
>From the C# class library which I compile to a .dll and add to my web
project.

public class ListSelector : CompositeControl, IPostBackDataHandler
{
public ListSelector()
{
btnClose.Click += new EventHandler(btnClose_Click);
}

public event EventHandler CloseClick;

btnClose.ID = "btnClose";
btnClose.EnableViewState = false;
btnClose.Text = this.CloseButtonCaption;

this.Controls.Add(btnClose);

this.btnClose.Attributes.Add("onclick", "return true;");

protected override void Render(HtmlTextWriter output)
{
this.btnClose.Attributes.Add("onclick", "return true;");
base.Render(output);
}

protected void btnClose_Click(object sender, EventArgs e)
{
if (this.CloseClick != null) this.CloseClick(this, new
EventArgs());
}
In the .aspx page the following event captures the button's click
event. This is raised when run
from VS2005, but not on the web server.

Protected Sub ListSelector1_CloseClick(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ListSelector1.CloseClick
Try
If MsgBox("Save changes?", MsgBoxStyle.YesNo, "Moxie
Quotes") = MsgBoxResult.Yes Then
'several lines of code here
Catch ex As Exception
MsgBox("Unable to save
parameters",MsgBoxStyle.Information)
End Try
End Sub

Bill

Jun 9 '07 #1
1 1757

<bi*********@yahoo.comwrote in message
news:11*********************@a26g2000pre.googlegro ups.com...
>I need help diagnosing an error that occurs on the web server where my
web site is hosted, but
it does not occur when I run it under VS2005.
I think you need to publish it to your local Web server and see if the
problem follows.

It talks about a misconfiguration of a Web server when a *request cannot be
fulfilled*.

http://www.microsoft.com/technet/arc....mspx?mfr=true

The Web site Publishing feature in VS 2005 that's compiling the code can
hide a problem when it's deployed to a Web server.

I had a situation were an Oracle dll I was using on the workstation was not
the same version that was out on the Web server. So, when the application
started, it was giving some off the wall error condition. I had a feeling it
was the dll, but I couldn't say for sure.

It became clear that it was a dll problem when the solution was not
published using VS 2005, and it was put out there on the Web server to be
compiled and executed at the server.
Jun 9 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eric | last post by:
I have built a composite user web control that I want to create dynamically. The form will contain a variable number of these controls and as well some of the contents of the user web control...
1
by: Wannabe_Geek | last post by:
Hi Iam new to MS .Net technology just getting along with it....I created a custom control ,which takes in a query and displays the data in a tabular format....something similar to a datagrid. ...
1
by: Lamont Adams | last post by:
Hi all, I've created numerous custom controls of varying complexity, but I've been on this problem for a day and a half, and I can't figure this mystery out. I hope one of you kind folks can...
4
by: DKode | last post by:
I have developed a custom server control that displays a login page that authenticates against AD. The server control works fine, but now I am trying to figure out the best way to output custom...
2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
2
by: shapper | last post by:
Hello, I created an Asp.Net 2.0 which contains a custom control. I compiled the project and now I am using it in a web site. The custom control contains a Panel, a Label and an Image. ...
3
by: Tomasz J | last post by:
Hello Developers, I have a control derived from System.Web.UI.WebControls.WebControl. Control has this property: public string Value { set { _value = value; } get { return _value; }
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.