Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
当文件太大时,C# HttpWebResponse contentlength = -1
我从烂番茄网站获取了一个 json 格式的字符串 我的代码看起来像 HttpWebRequest webRequest HttpWebRequest HttpWebRequest Create url webRequest Method G
c
httpWebRequest
httpwebresponse
将 Cookie 从 CookieContainer 写入 IE Cookie 存储
我想从桌面应用程序导航到 Web 应用程序中的页面 没问题 我听到你说 只需使用正确的 URL 启动默认浏览器即可 但是 Web 应用程序使用 ASP NET 表单身份验证 用户不想看到登录页面 因为他们已经在桌面应用程序中使用相同的凭据进
c
NET
internetexplorer
httpwebresponse
cookiecontainer
c# http Post 在 webresponse 中没有得到任何内容
这是我的请求和响应代码 System IO MemoryStream xmlStream null HttpWebRequest HttpReq HttpWebRequest WebRequest Create url xmlStream
c
POST
httpWebRequest
httpwebresponse
通过 HttpWebRequest 检索 URL 时,我可以看到目标服务器的 IP 地址吗?
假设我正在检索一个网址 如下所示 string url http www somesite com somepage html HttpWebRequest req HttpWebRequest WebRequest Create url
httpWebRequest
DNS
ipaddress
httpwebresponse
HttpWebRequest.GetResponse() 失败时如何获取错误信息
我正在启动 HttpWebRequest 然后检索它的响应 有时 我会收到 500 或至少 5 错误 但没有描述 我可以控制两个端点 并希望接收端获得更多信息 例如 我想将异常消息从服务器传递到客户端 使用 HttpWebRequest 和
c
httpWebRequest
httpwebresponse
Httpwebrequest / Httpwebresponse - 重定向计数
我试图弄清楚在我最终到达最终内容之前我的网络请求被重定向了多少次 我正在创建我的网络请求 如下所示 var httpRequest HttpWebRequest WebRequest Create some arb path httpReq
httpWebRequest
httpwebresponse
获取异步 HttpWebRequest 的响应
我想知道是否有一种简单的方法来获取异步 httpwebrequest 的响应 我已经看过这个问题了here https stackoverflow com questions 9877120 how do i actually get th
c
Asynchronous
httpWebRequest
httpwebresponse
较大的 System.IO.MemoryStream 是否会导致应用程序的内存使用量急剧增加?
我正在构建一个库 允许用户从 URL 下载文件 我正在考虑的选项之一是让用户指定文件的预期 MD5 校验和 该库的 GetFile string url 函数可确保下载的流的校验和与用户指定的校验和相匹配 意识到 HttpWebRespon
c
httpwebresponse
memoryStream
如何在 Http 响应完成之前读取响应流
当使用 HttpWebRequest 对象发出请求时 我需要调用方法 GetResponse 来发送请求并获取响应 此方法的问题是 在收到所有数据之前 它不会返回响应对象 假设我正在下载一个 100 MB 的文件 在响应完成并且所有 100
c
http
httpWebRequest
httpwebresponse
在 HTTP 响应标头中使用内容处置
我发现以下 asp net 代码在从数据库提供文件时非常有用 Response AppendHeader content disposition attachment filename fileName 这允许用户将文件保存到他们的计算机
http
httpheaders
httpwebresponse
HttpResponse
contentdisposition
强制 C# 的 HTTP 响应返回状态代码而不是描述
我目前正在使用此脚本来获取 HTTP 响应标头 public static List
c
httpwebresponse
检查 URL 是否存在 - HTTP 请求总是返回异常
有很多关于如何检查 URL 是否有效的帖子 它们都具有基本相同的代码 这似乎适用于每个人 但不适合我 我不明白为什么 public static bool ifURLexists string url try var request Web
c
NET
httpWebRequest
httpwebresponse
C# .NET 中的 Web 响应最多只能运行几次
我正在使用 twitter api 开发一个应用程序 其中涉及编写一个方法来检查用户是否存在 这是我的代码 public static bool checkUserExists string user string URL https tw
c
httpWebRequest
httpwebresponse
VB.NET 使用 WebRequest 检查 URI 是否有效
寻找最佳方法来确定 VB NET 中是否存在 URI 而无需下载实际内容 System IO FileExists My Computer FileSystem FileExists可以在本地使用来确定文件是否存在 是否有适用于 Web 的
VBNET
httpwebresponse
GetResponseAsync 不接受取消令牌
看来 GetResponseAsync 不接受 Async Await 中的cancelToken 所以问题是 如果我需要从响应中收集 Cookie 我该如何取消以下过程 using HttpWebResponse response Htt
c
httpWebRequest
asyncawait
httpwebresponse
cancellationtoken
如果使用 C# 的内容长度 > 7kb,则无法在 WebRequest 上发布
我正在尝试将 Json 发布到我们的网络服务 我的问题是 当我的 request ContentLength 超过 7kb 时 我将在 request GetResponse 处收到 Web 异常 500 但如果我的 request Con
c
json
WebServices
httpWebRequest
httpwebresponse
我需要什么 uri 模式才能从手持设备与 PC 进行通信?
正如我被提醒的那样here https stackoverflow com questions 22306678 why am i getting unable to connect to the remote server 我可能需要使用
httpWebRequest
windowsce
httpwebresponse
ppp
compactframework20
HttpWebResponse 上的 ContentType 属性是否有枚举(“text/plain”、“application/octet-stream”等)?
我能找到的最接近的东西是System Net Mime MediaTypeNames但这似乎并没有包含所有内容 例如 json 因为它似乎更关注电子邮件附件 枚举没有多大意义 MIME 类型是开放式的 也就是说 该列表不是有限的 不时添加新
ContentType
mimetypes
httpwebresponse
加载并解析存储在文件中的 HTTP 响应
我有一个本地存储的文件 其中包含 http 请求的响应 它看起来像这样 HTTP 1 1 200 OK Accept Ranges bytes Access Control Allow Credentials true Access Con
c
http
Web
httpWebRequest
httpwebresponse
如何将WebResponse.GetResponseStream返回转换为字符串?
我看到很多例子 但它们都缓慢地将它们读入字节数组或一次 256 个字符 为什么 是否不建议只转换结果Stream值转换为字符串 我可以在其中解析它 您可以使用StreamReader ReadToEnd using Stream strea
c
NET
string
httpwebresponse
1
2
»