YAFLogo

brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander Topic Starter
12 years ago
Trying login with Twitter, but receive error when returning to forum.

(the email ' A new user has registered on the forum' is generated ok).

Server Error in '/Forum' Application.

--------------------------------------------------------------------------------

The remote server returned an error: (401) Unauthorized.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error:

Line 370: finally

Line 371: {

Line 372: webRequest.GetResponse().GetResponseStream().Close();

Line 373:

Line 374: if (responseReader != null)

Source File: D:\OurWorld\SoftwareInstalls\YAF\YAF-v1.9.6.1-RTW-SRC\YAF.Core\Services\Twitter\OAuthTwitter.cs Line: 372


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago
Take a look at the application settings of your twitter app under Application type, it needs to be set to "Read and Write"

I updated the documentation to include this important information

brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander Topic Starter
12 years ago
Thanks I will give that a try.


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago

Take a look at the application settings of your twitter app under Application type, it needs to be set to "Read and Write"

I updated the documentation to include this important information

Originally Posted by: tha_watcha 

"Permissions: read and write" and I'm getting the following error when users try to sign in. However, this error comes and goes. Currently, I have disabled it to allow myself to log into my site.

Server Error in '/' Application.

The remote server returned an error: (401) Unauthorized.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[WebException: The remote server returned an error: (401) Unauthorized.]

System.Net.HttpWebRequest.GetResponse() +6117395

YAF.Core.Services.Twitter.OAuthTwitter.WebResponseGet(HttpWebRequest webRequest) +191

YAF.Core.Services.Twitter.OAuthTwitter.WebRequest(Method method, String url, String postData) +336

YAF.Core.Services.Twitter.OAuthTwitter.OAuthWebRequest(Method method, String url, String postData) +1357

YAF.Core.Services.Twitter.OAuthTwitter.AuthorizationLinkGet() +78

YAF.Core.Services.YafSingleSignOnUser.GenerateTwitterLoginUrl(Boolean generatePopUpUrl) +323

YAF.Pages.login.Page_Load(Object sender, EventArgs e) +1064

System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.Control.OnLoad(EventArgs e) +91

System.Web.UI.Control.LoadRecursive() +74

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Take a look at the application settings of your twitter app under Application type, it needs to be set to "Read and Write"

I updated the documentation to include this important information

Originally Posted by: Zero2Cool 

"Permissions: read and write" and I'm getting the following error when users try to sign in. However, this error comes and goes. Currently, I have disabled it to allow myself to log into my site.

Server Error in '/' Application.

The remote server returned an error: (401) Unauthorized.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[WebException: The remote server returned an error: (401) Unauthorized.]

System.Net.HttpWebRequest.GetResponse() +6117395

YAF.Core.Services.Twitter.OAuthTwitter.WebResponseGet(HttpWebRequest webRequest) +191

YAF.Core.Services.Twitter.OAuthTwitter.WebRequest(Method method, String url, String postData) +336

YAF.Core.Services.Twitter.OAuthTwitter.OAuthWebRequest(Method method, String url, String postData) +1357

YAF.Core.Services.Twitter.OAuthTwitter.AuthorizationLinkGet() +78

YAF.Core.Services.YafSingleSignOnUser.GenerateTwitterLoginUrl(Boolean generatePopUpUrl) +323

YAF.Pages.login.Page_Load(Object sender, EventArgs e) +1064

System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.Control.OnLoad(EventArgs e) +91

System.Web.UI.Control.LoadRecursive() +74

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Originally Posted by: tha_watcha 

Please disable twitter login. turns out the api urls have changed.

I committed the changed files to the repository...

http://yafnet.codeplex.com/SourceControl/changeset/0cc0486d9c24 

If you able to compile the source code you can fix this yourself otherwise you have to wait for the next version.

Trickstar
11 years ago

Take a look at the application settings of your twitter app under Application type, it needs to be set to "Read and Write"

I updated the documentation to include this important information

Originally Posted by: tha_watcha 

"Permissions: read and write" and I'm getting the following error when users try to sign in. However, this error comes and goes. Currently, I have disabled it to allow myself to log into my site.

Server Error in '/' Application.

The remote server returned an error: (401) Unauthorized.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[WebException: The remote server returned an error: (401) Unauthorized.]

System.Net.HttpWebRequest.GetResponse() +6117395

YAF.Core.Services.Twitter.OAuthTwitter.WebResponseGet(HttpWebRequest webRequest) +191

YAF.Core.Services.Twitter.OAuthTwitter.WebRequest(Method method, String url, String postData) +336

YAF.Core.Services.Twitter.OAuthTwitter.OAuthWebRequest(Method method, String url, String postData) +1357

YAF.Core.Services.Twitter.OAuthTwitter.AuthorizationLinkGet() +78

YAF.Core.Services.YafSingleSignOnUser.GenerateTwitterLoginUrl(Boolean generatePopUpUrl) +323

YAF.Pages.login.Page_Load(Object sender, EventArgs e) +1064

System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.Control.OnLoad(EventArgs e) +91

System.Web.UI.Control.LoadRecursive() +74

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Control.LoadRecursive() +146

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Originally Posted by: Zero2Cool 

Please disable twitter login. turns out the api urls have changed.

I committed the changed files to the repository...

http://yafnet.codeplex.com/SourceControl/changeset/0cc0486d9c24 

If you able to compile the source code you can fix this yourself otherwise you have to wait for the next version.

Originally Posted by: tha_watcha 

Could you post the fixed YAF.Core.dll and YAF.Core.xml with just these changes please? I have fully developed site and have had to restart it and I don't want to have to start it again. It would be really appreciated if you could do this.


UserPostedImage 
metta123
11 years ago
Have you resolved this? In fact does anyone have a YAF forum that currently has the log in with twitter feature which is fully working? If so I would love to hear from you. I have the dlls if you still need them as I have changed the urls and compiled the project.
brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander Topic Starter
11 years ago

Have you resolved this? In fact does anyone have a YAF forum that currently has the log in with twitter feature which is fully working? If so I would love to hear from you. I have the dlls if you still need them as I have changed the urls and compiled the project.

Originally Posted by: metta123 

I think now I am using the DNN version this does not apply to me - but having said that I would love to know if the DNN 'Register with Twitter' actually works ..! Please feel free to try it out - I will remove any account after test if you wish..

Register option - top left

http://leansoftware.net/ 

Cheers


UserPostedImage New Network Edition V2.8 - Released Dec 2013 
metta123
11 years ago
I have just tried to login with my twitter credentials and it raises a critical error. Your Facebook is fine. I'm now registered. They recently made changes to their .api and replaced the old version. This might be where the issue is. You should maybe switch on errors to get the right error code. Mine just doesn't register the user at all. Its probably just a setting in Twitter dev.

Don't you still need to change the URLS and compile the DNN version of YAF? Where can you download the DNN version of YAF with the full source. I could download it all and have a look. Though Im no expert with YAF, and never looked at the DNN version or any other CMS YAF software.

I like your site. Its very good. I like the YAF integration.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago
Currently no Twitter Login via YAF should work because the 1.0 Twitter API no longer works. It will take some time until i can resolve this problem and migrate to 1.1
metta123
11 years ago
Thanks for the response. That is exactly what I needed to know.
brigzy
  • brigzy
  • 66.2% (Friendly)
  • YAF Commander Topic Starter
11 years ago

I have just tried to login with my twitter credentials and it raises a critical error. Your Facebook is fine. I'm now registered. They recently made changes to their .api and replaced the old version. This might be where the issue is. You should maybe switch on errors to get the right error code. Mine just doesn't register the user at all. Its probably just a setting in Twitter dev.

Originally Posted by: metta123 

Thanks, I have posted the problem on the DNN community forum, maybe they can help, I will post any discovery back here.

Don't you still need to change the URLS and compile the DNN version of YAF? Where can you download the DNN version of YAF with the full source. I could download it all and have a look. Though Im no expert with YAF, and never looked at the DNN version or any other CMS YAF software.

Originally Posted by: metta123 

I don't recall rebuilding YAF - but I might have - the DLL dates are 14/7/2012 .

I like your site. Its very good. I like the YAF integration.

Originally Posted by: metta123 

Thanks - hats off to the YAF guys really.

Currenty working on the online help for EDT so you should see lots of new pages and and examples appearing ...

F.Y.I The help desk is a modified version of ADefHelpDesk , supplied with source code so was easy enough for me to adapt. Primarily I wanted Public and Private help tickets.


UserPostedImage New Network Edition V2.8 - Released Dec 2013