Re: Adding headers (General questions)
Matt,
Can you please try something like this. This worked for me without any problem
[code] Dim WithEvents web1 As WeOnlyDo.Server.WebServer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
web1 = New WeOnlyDo.Server.WebServer
web1.DocumentRoot = AppPath() + \WebSite1
web1.DefaultPage = Default.aspx
Try
web1.Start()
Catch ex As Exception
MsgBox( There was an error: & ex.Message, vbOKOnly, Error )
End Try
End Sub
Private Sub web1_RequestDoneEvent(ByVal Sender As Object, ByVal Args As WeOnlyDo.Server.WebRequestDoneArgs) Handles web1.RequestDoneEvent
Args.User.ExecuteASPX(AppPath() + \WebSite1 , / , / , web.config )
Args.User.Response.Headers.Add( test_name , test_value )
End Sub
Public Function AppPath() As String
AppPath = System.IO.Directory.GetParent(System.IO.Directory.GetParent(System.IO.Directory.GetCurrentDirectory).ToString).ToString
End Function[/code]
If problem persist, can you maybe explain how did you check if header was sent?
Drazen
Complete thread:
- Adding headers - Matt Crook, 2011-01-14, 05:08
- Re: Adding headers - woddrazen, 2011-01-14, 10:12
- Re: Adding headers - Matt Crook, 2011-01-14, 22:56
- Re: Adding headers - woddrazen, 2011-01-14, 23:54
- Re: Adding headers - Matt Crook, 2011-01-15, 00:32
- Re: Adding headers - Matt Crook, 2011-01-15, 08:12
- Re: Adding headers - woddrazen, 2011-01-15, 11:11
- Re: Adding headers - Matt C, 2011-01-19, 08:51
- Re: Adding headers - wodDamir, 2011-01-19, 09:46
- Re: Adding headers - Matt C, 2011-01-19, 08:51
- Re: Adding headers - woddrazen, 2011-01-15, 11:11
- Re: Adding headers - Matt Crook, 2011-01-15, 08:12
- Re: Adding headers - Matt Crook, 2011-01-15, 00:32
- Re: Adding headers - woddrazen, 2011-01-14, 23:54
- Re: Adding headers - Matt Crook, 2011-01-14, 22:56
- Re: Adding headers - woddrazen, 2011-01-14, 10:12