从代理后面使用 BugzScout.net 时遇到困难
我正在尝试使用 Fogbugz 的 BugzScout 来自动将无人处理的应用程序异常提交到我的 Fogbugz 按需帐户。 我已经为它编写了一个包装类,并且在我的盒子上一切似乎都很美妙。 在生产环境中测试相同的代码,在需要身份验证的代理后面,除了问题之外什么也没有。
我开始修改 BugzScout 代码,以便让它通过代理进行身份验证,在尝试了通过 Google 搜索建议的许多不同方法后,找到了一种有效的方法! 但现在我从 Fogbugz 本身收到“连接主动拒绝”错误,我不知道该怎么办。
下面是 BugzScout 通过 .net WebClient 连接以提交新案例的代码,我进行了修改以处理我们的代理。 我做了什么会导致 Fogbugz 拒绝我的请求? 为了便于阅读,我已从该过程中删除了所有非 Web 客户端相关的代码。
public string Submit(){
WebClient client = new WebClient();
WebProxy proxy = new WebProxy();
proxy.UseDefaultCredentials = true;
client.Proxy = proxy;
Byte[] response = client.DownloadData(fogBugzUrl);
string responseText = System.Text.Encoding.UTF8.GetString(response);
return (responseText == "") ? this.defaultMsg : responseText;
}
网址正确并且案例填写正确 - 这已经过验证。
编辑:附加信息。
- 使用 Fogbugz 点播。
- 完整使用 FogBugz.net 代码,仅添加这些内容
WebProxy proxy = new WebProxy(); proxy.UseDefaultCredentials = true; client.Proxy = proxy;
- 尝试连接到 https:// 时会发生错误/oursite.fogbugz.com/scoutsubmit.asp 和 http://oursite.fogbugz。 com//scoutsubmit.asp(显然,除了一个说端口 443,另一个说端口 80)
- 我对 Web 身份验证一无所知,所以我无法告诉你我正在使用哪种类型 - 如果你告诉我在哪里可以找到,我很乐意为您解答。
I'm attempting to use Fogbugz's BugzScout in order to automatically submit unhanded application exceptions to my Fogbugz on demand Account. I've written up a wrapper class for it and everything appears to be just groovy - on my box. Testing the same code in the production environment, behind a Proxy that requires authentication, I have had nothing but issues.
I went to work modifying the BugzScout code in order to get it to authenticate with the Proxy, and after trying many different methods suggested via a Google search, found one that works! But now I'm getting an "Connection actively refused" error from Fogbugz itself, and I don't know what to do.
Here is the code where the BugzScout connects via a .net WebClient to submit a new case, with my modifications to deal with our Proxy. What am I doing that would cause Fogbugz to refuse my request? I've removed all non web-client related code from the procedure for ease of reading.
public string Submit(){
WebClient client = new WebClient();
WebProxy proxy = new WebProxy();
proxy.UseDefaultCredentials = true;
client.Proxy = proxy;
Byte[] response = client.DownloadData(fogBugzUrl);
string responseText = System.Text.Encoding.UTF8.GetString(response);
return (responseText == "") ? this.defaultMsg : responseText;
}
The url is correct and the case is filled in properly- this has been verified.
EDIT: Additional info.
- Using Fogbugz on Demand.
- Using FogBugz.net code in it's entirety, with only these additions
WebProxy proxy = new WebProxy(); proxy.UseDefaultCredentials = true; client.Proxy = proxy;
- Error occurs when attempting to connect to both https://oursite.fogbugz.com/scoutsubmit.asp and http://oursite.fogbugz.com//scoutsubmit.asp (except one says port 443, and the other port 80, obviously)
- I don't know anything about web authentication so I can't tell you what kind I'm using- if you tell me where to look I'd be happy to answer that for you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 Fogbugz 获得修复 - 这是通过代理身份验证并且不会使用 Bugzscout 进行错误身份验证的适当网络代码。
Got the fix from Fogbugz- this is the appropriate network code to get though the proxy authentication and not mis-authenticate with Bugzscout.
您的fogbugzUrl 是否使用HTTP 基本身份验证? 是 SSL(按需托管吗?)
连接主动拒绝消息将来自 Web 服务器本身,而不是真正的 FogBugz。
你能发布 HTTP 状态代码吗?
如果您使用 FogBugz On Demand,需要注意的一件事是您必须使用 https:// url(而不是 http url)。
Is your fogbugzUrl using HTTP Basic Authentication? Is it SSL (hosted on On Demand?)
The connection actively refused message would be coming from the web server itself, not really FogBugz.
Can you post the HTTP Status Code?
One thing to note if you are using FogBugz On Demand is you HAVE to use the https:// url (not the http url).