httpcontext

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
4/7/2011 11:21:44 PM
Gravatar
Total Posts 15

httpcontext

I am making a web app with unity.

I am trying to use my mojo portal membership.

I have to use yield to read the web page for information.

The following is code I am trying. For some reason it not only gives the query it also gives all the html code as well.

Any thing you can see about why and what I can do?

 

Unity Code.

 if (GUI.Button(new Rect((loginWindow.width / 2) - 50, (loginWindow.height / 2) - 25, 100, 50), "Enter"))
           {
              
               StartCoroutine(NameCheck());
           }

 

 IEnumerator NameCheck()
    {
        var scriptCheck = "http://**********/Login.aspx";(location blocked out)

        WWW getScript = new WWW(scriptCheck);
            yield return getScript;
        if (getScript.error == null)
        {

            header = getScript.text;
        }
        else
        {
            header = getScript.error;
        }
    }

*****************************************************

ASP.net Code

 

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Login.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>

<body>
    <form id="form1" method="post" runat="server" >
    <div>
    </div>
    </form>
</body>
</html>

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string user = HttpContext.Current.User.Identity.Name.ToString();
        HttpContext.Current.Response.Write(user);
    }


}

4/12/2011 10:47:47 AM
Gravatar
Total Posts 15

Re: httpcontext

Is there a batter place I should ask this?

Or maybe since it is not really a mojo problem should I ask elsewhere?

4/12/2011 11:05:35 PM
Gravatar
Total Posts 15

Re: httpcontext

I have it figured.

I have to not treat it as a web page at all, have to remove all html content from the aspx page and just have it return the response.

You must sign in to post in the forums. This thread is closed to new posts.