Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Xml
- Partial Class _Default
- Inherits System.Web.UI.Page
- Public Function getSession()
- Dim mstrSession As String
- Const url As String = "http://localhost/Microstrategy/asp/TaskAdmin.aspx?taskId=getSessionState&taskEnv=xml&taskContentType=xml&server=SERVER&project=PROJECT&uid=user&pwd=passwd"
- Dim reader As XmlTextReader = New XmlTextReader(url)
- Dim tag As String = ""
- Do While (reader.Read())
- Select Case reader.NodeType
- Case XmlNodeType.Element : tag = reader.Name
- Case XmlNodeType.EndElement : tag = ""
- Case XmlNodeType.Text
- If tag = "min-state" Then mstrSession = reader.Value
- End Select
- Loop
- Return mstrSession
- End Function
- Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
- Response.BufferOutput = True
- Response.Redirect("http://localhost/Microstrategy/asp/Main.aspx?Server=SERVER&Project=PROJECT&Port=0&evt=2048001&src=Main.aspx.2048001&visMode=0&documentID=3A85FC34DDF56F1DF8ADBA22F7D&connmode=8&ru=1&share=1&hiddensections=header,path,dockTop,dockLeft,DockRight,footer&mstrSmgr=" & getSession())
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement