Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Add Response Server Header
k5vip03
#1 Posted : Tuesday, November 10, 2009 11:40:00 PM(UTC)
Groups: Member
Joined: 11/10/2009(UTC)
Posts: 3
Location: singapore

Hi All,

What should we do if we want to add a server header on the cassini web server? since I've an application that add the Server Header.
in the c# the code will be like this:

Quote:
Response.AddHeader("Server", "Storm V1.0 Application");


I've tried to run this application but seems the addition for the server header is not working.
Thanks in advanced for the hints.

Regards.
k5vip03
#2 Posted : Wednesday, November 11, 2009 5:32:22 PM(UTC)
Groups: Member
Joined: 11/10/2009(UTC)
Posts: 3
Location: singapore

Any clue for this matter?, Thanks.
Ultidev Team
#3 Posted : Wednesday, November 11, 2009 5:40:05 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Unfortunately replacing certain headers, including "server" is not supported by UltiDev Cassini.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
k5vip03
#4 Posted : Wednesday, November 11, 2009 8:03:14 PM(UTC)
Groups: Member
Joined: 11/10/2009(UTC)
Posts: 3
Location: singapore

Hi Ultidev Team,

I'm didn't want to replace the server header, I'm just want to add another server header.
It will look like this :
Server: UltiDev Cassini/2.1.4.3, Storm V1.0 Application

Cheers!
Thanks

Ultidev Team
#5 Posted : Thursday, November 12, 2009 4:59:30 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

We have tried to come up with a work-around, but we could not. It seems to be not possible to add server header to the response. We compared the behavior with Microsoft Visual Studio Development Web Server (WebDev) and IIS 5.1, and noticed that while IIS 5 does allow adding extra headers, WebDev does not. Here is a snippet of code we tested:
Code:
protected void Page_Load(object sender, EventArgs e)
{
this.Response.AddHeader("Server", "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW");
}


Here's the set of WebDev headers the way they look on the wire:
Code:
HTTP/1.1 200 OK
Server: ASP.NET Development Server/9.0.0.0
Date: Thu, 12 Nov 2009 14:52:17 GMT
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 494
Connection: Close


Here's how IIS headers for the same code:
Code:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Thu, 12 Nov 2009 14:51:09 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Server: WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 494


Could you please let us know what is the business case for this? Why an application would use a header reserved for web servers? If there is a legitimate case, we may consider adding it to the next release of UltiDev Cassini.

Best regards,
UltiDev Team.

Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (4)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.