how to submit a request on a webserver

I have this url that submit a request on the webserver to generate a report, how can I submit this request through vb.net ? once the request is executed , I need to open the same report in pdf format.... which I know how to do, but not able to submit this request.

any help?



http://maroa/acweb/maroa/StrategicPolicyAnalysis/UtilizationRpt.rox?Submit&__scheduleType=background& __overwrite=new&__outputname=/StrategicPolicyAnalysis/temp.roi
sanjaypandeyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joel CoehoornDirector of Information TechnologyCommented:
Look at system.net.webclient, or if that won't do it system.net.httpwebrequest/system.net.httpwebresponse
0
sanjaypandeyAuthor Commented:
Thanks I will do research on that...

Do you have any example to go with it.

0
Joel CoehoornDirector of Information TechnologyCommented:
system.net.webclient is very easy to use.  Just trust intellisense to show you what you need to use it and you'll do fine.  The only problem you might have is if you need to authenticate first.
0
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

sanjaypandeyAuthor Commented:
Hello, I was trying to use the code below, but somehow its freezing afer submitting the request....  so the report get generated on the report server but I dont get the output in the PDF because its some how not moving beyond this line

strm = New StreamReader(myResponse.GetResponseStream(), False)

any help please
varReportURL = "http://maroa/acweb/maroa/StrategicPolicyAnalysis/PPM.rox?Submit&__scheduleType=sync&__overwrite=new&__outputname=/StrategicPolicyAnalysis/temp8.roi&" & Server.UrlEncode(varPARAMETERS)
        'Dim strm As StreamReader
 
      Dim myReq As HttpWebRequest = HttpWebRequest.Create(varReportURL)
        myReq.Method = "POST"
        myReq.ContentType = "application/x-www-form-urlencoded"
        myReq.ContentLength = 2
        myReq.Timeout = 9000000
        Dim myResponse As HttpWebResponse = myReq.GetResponse
 
        Dim m_sPageResponded As String
        m_sPageResponded = myResponse.ResponseUri.ToString()
        'Response.Write(m_sPageResponded)
 
        Dim strm As StreamReader
        strm = New StreamReader(myResponse.GetResponseStream(), False)
        Dim sLine As String = "abc"
        Response.Write("test")
        While Not IsDBNull(sLine)
          Response.Write(sLine)
          Response.Write("test")
          sLine = strm.ReadLine()
          Console.WriteLine(sLine)
        End While

Open in new window

0
Joel CoehoornDirector of Information TechnologyCommented:
Looks like it might timeout it you waited about 3 months.  
0
sanjaypandeyAuthor Commented:
looks like I am step closer... in that its not freezing up.....using this code below but its executing the code to display the report before report generation completes...    any thoughts or help


 varReportURL = "http://maroa/acweb/maroa/StrategicPolicyAnalysis/PPM.rox?Submit&__scheduleType=immediate&__overwrite=new&__outputname=/StrategicPolicyAnalysis/temp91.roi&" & Server.UrlEncode(varPARAMETERS)

        Dim myReq As HttpWebRequest = HttpWebRequest.Create(varReportURL)
        myReq.Method = WebRequestMethods.Http.Get
        Dim myResponse As HttpWebResponse = myReq.GetResponse
        Dim sline As String = ""
        Dim reader As New StreamReader(myResponse.GetResponseStream())
        Dim tmp As String = reader.ReadToEnd()
        myResponse.Close()
        varReportURL = "http://maroa/acweb/maroa/StrategicPolicyAnalysis/temp91.roi?ViewPage&format=pdf&action=view&operation=open"
        Response.Write("<script>window.open('" + varReportURL + "','','_target=blank', 'width=1000,height=600');</script>")


0
sanjaypandeyAuthor Commented:
I was able to resolve it, had to change the report request URL.

&__scheduleType=immediate&__wait=wait&__overwrite=old
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.