我有问题。我尝试从我的MVC应用程序连接Gmail API。在我的本地机器上一切正常,但当我将应用程序部署到IIS时,我得到404错误。如果正确的是“http://localhost/AuthCallback/IndexAsync”,则会将应用程序重定向到“http://localhost/myApplicationName/AuthCallback/IndexAsync”地址。
我可以更改默认重定向网址吗?
用户授权后我收到错误消息。
我正在使用Google.Apis版本1.9.1.12395和GoogleApis.Gmail.v1版本1.9.0.31。
答案 0 :(得分:3)
好的,我解决了问题。我必须覆盖 AppFlowMetadata
类中的参数public override string AuthCallback
{
get
{
return @"/ApplicationName/AuthCallback/IndexAsync";
}
}