Connecting to Atlassian JIRA from ASP.NET/C# via IIS on localhost

I am trying to create a small utility application wherein I need to login to JIRA (Atlassian.com).

Our JIRA server is hosted at Atlassian - example.atlassian.net and the application that I am trying to develop is hosted on my local server (192.168.1.XXX), on IIS. The application uses ASP.NET / C#.

I tried to run the sample JIRA example which presents a simple login page wherein the user is supposed to enter his/her JIRA credentials. Everything is fine up to this point.

If someone enters incorrect username/password, the application displays some error message (which I believe is broken):

Server Error in '/JiraExample' 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() +1743
   JiraExample.JiraManager.RunQuery(JiraResource resource, String argument, String data, String method) +597
   JiraExample.JiraManager.GetProjects() +100
   JiraExample.Login.Button1_Click(Object sender, EventArgs e) +143
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11802193
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1735

 


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

 

But if correct username/password are entered, it says "This site cannot be reached" and points to firewall/proxy issues.

Is it because of lack of FQDN or because of the private IP address? If yes, is there a way to forward the JIRA response to my application?

Thanks

 

1 answer

This widget could not be displayed.

I'm afraid this is not a JIRA related problem.  Your network setup is not allowing the connection through to JIRA correctly - you'll need to debug why.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

165 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you