Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用c登录到第三方网站#_C#_Asp.net - Fatal编程技术网

C# 使用c登录到第三方网站#

C# 使用c登录到第三方网站#,c#,asp.net,C#,Asp.net,我有 通过查看它的源代码,我在这个URL中找到了用于登录的表单 <form name="frmLogin" action="j_spring_security_check" method="post"><!-- FORM START --> <div class="pod"> <div class="single_input">

我有

通过查看它的源代码,我在这个URL中找到了用于登录的表单

<form name="frmLogin" action="j_spring_security_check" method="post"><!-- FORM START -->
                <div class="pod">
                    <div class="single_input">
                        <label class="label" for="j_username">User Name</label>
                        <div class="field">
                            <input type="text" id="j_username" name="j_username" value="">
                        </div>
                    </div>
                    <div class="single_input">
                        <label class="label" for="j_password">Password</label>
                        <div class="field">
                            <input type="password" id="j_password" name="j_password" value="">
                        </div>
                    </div>
                    <div class="single_input">

                        <div class="field">
                            <a href="externalResetPassword">Forgot Password</a>
                        </div>
                    </div>
                </div>
                <div class="cta center">
                    <input name="btnContinue" type="submit" value="Login" class="btnContinue">
                </div>
            </form>
这句话很让人困惑

sw.Write("application=portal&url=http%3A%2F%2Fwww.fastactportal.com%2Fportal%2Fredirect%3Bjsessionid%3D1C568AAA1FB8B5C757CF5F68BE6ECE65%3Ftype%3Dssologin%26url%3D%2Fportal%2Fshow%3Bjsessionid%3D1C568AAA1FB8B5C757CF5F68BE6ECE65%3Fidc%3D1023278&realm=sso&j_username=" + Username + "&j_password=" + PassWord + "&x=16&y=11");

有谁能帮助我理解这一点吗

许多web应用程序(如代理web服务器和多个搜索引擎)都需要访问其他网站的HTML页面。类
WebClient
WebRequest
WebResponse
通常用于在ASP.NET中执行这些要求

另一方面,Windows窗体应用程序中使用
WebBrowser
控件来浏览网页和其他启用浏览器的文档
WebBrowser
提供了许多用于跟踪数据过程的事件,以及许多用于在HTML元素级别访问和创建新内容的属性和方法

在下面的链接中,我找到了使用窗口浏览器控件的网站


是的,您可以使用HttpWebRequest
sw.Write("application=portal&url=http%3A%2F%2Fwww.fastactportal.com%2Fportal%2Fredirect%3Bjsessionid%3D1C568AAA1FB8B5C757CF5F68BE6ECE65%3Ftype%3Dssologin%26url%3D%2Fportal%2Fshow%3Bjsessionid%3D1C568AAA1FB8B5C757CF5F68BE6ECE65%3Fidc%3D1023278&realm=sso&j_username=" + Username + "&j_password=" + PassWord + "&x=16&y=11");