TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mrudul Ganpule
NA
23
25.6k
web browser control not initiate if backgroundworker running
May 2 2014 2:15 AM
when i click on connection button this backgroundWorkerStartupProcessLoader start:
private void backgroundWorkerStartupProcessLoader_DoWork(object sender, DoWorkEventArgs e)
{
//constructor of web browser
OAuthPopup oauthPopup = new OAuthPopup(_ippRealmOAuthProfile);
}
//OAuthPopup .cs
public OAuthPopup(IppRealmOAuthProfile ippRealmOAuthProfile)
{
try
{
initializeComponent() ;
_ippRealmOAuthProfile = ippRealmOAuthProfile;
readConsumerKeysFromConfiguration();
startOAuthHandshake();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
#region " Redirect to Service Provider - IPP "
private void redirectToIppForUserAuthorization(OnlineQBO.DevDefined.OAuth.Framework.IToken requestToken)
{
try
{
// put existing web browser code in here
var oauthUserAuthorizeUrl = "https://appcenter.intuit.com/Connect/Begin";
this.oauthBrowser.Navigate(oauthUserAuthorizeUrl + "?oauth_token=" + requestToken.Token + "&oauth_callback=" + OnlineQBO.DevDefined.OAuth.Framework.UriUtility.UrlEncode(_dummyProtocol + _dummyHost));
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
#endregion
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
I got the error when the intializeComponent() or oauthBrowser.Navigate method called.
actual problem is whenever backgroungworker start , he is not going to initiate UI control(web browser)
Please help me ..
Reply
Answers (
2
)
Cross Thread Exception
How to resize the Picture by moving the scroll in c#?