Connecting to Mantis Bug Tracker via .Net - bug-tracking

I tried to connect and add an issue to Mantis Bug Tracker serwis, but no success. I am using .Net Framework 2.0(Compact FrameWork). My Bug Tracker Service have a few projects and i want to add issue to specific one including user, time and description. I tried this, but nothing happened
Mantis.IssueData issue = new Mantis.IssueData();
issue.id = "1";
issue.description ="Test issue";
issue.date_submitted = DateTime.Now;
issue.description = "Test description";
MantisConnect mantisConnect = new Mantis.MantisConnect();
mantisConnect.Beginmc_issue_add(Properties.Resources.MantisLogin, Properties.Resources.MantisPassword, issue,null,null);
Thank you in advance for help

Related

Has azure user ids changed their format?

Good evening ppl at Microsoft!
I have an Mobile App Service at Microsoft Azure Located at South Central US named CeneamApp.
My backend is configured in a way so that my user can access only the data they capture, by making use of stable user ids.
so I had followed Adrian Hall book to create an a user id (https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter2/authorization/)with the following format sid:{identifier}as described here: (https://github.com/Azure/azure-mobile-apps-net-server/wiki/Understanding-User-Ids).
now all my userid had been changed and my user cant access their previous data capture by them, because somehow the provider or issuer or whatever is going on, doesnt let me retrieve a user id as described by the github project team wiki (in the previous link). so instead i receive a new userid but seem to be a random number:
I'm adding screenshot of the essential part of my code at my backend project which i debugged so i could understand whats going on and my dummy database where you can see an stable_id save on it and the new suppose stable_ids the next two rows.
Debugged code retrieving apparently a new userid from FACEBOOK could you confirm about this change? because I havent been able to understand this change.
Dummy Database with the lost userid and the new ones from other accounts database screenshot
if anyone has information about this odd behavior i would appreciate to enlight me, because this line of code:
principal.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value;
used to give me a user id with this format: "sid:{identifier}", now the format is a the screenshot shows.
Same situation here. About to go live and suddenly this. Interesting that only one Mobile App based in the UK datacenter is affected. Other 2 apps which are in production and plus another Web App are still fine.
The full solution can only be provided by Azure team. But I have a workaround and and idea:
1. Workaround.
In the base controller I read and parse the token from the header. The sid is in the subject of the token. The code is simple:
string _userSid;
public string UserSid
{
get
{
if (_userSid == null)
{
KeyValuePair<string, IEnumerable<string>> auth_header = Request.Headers.FirstOrDefault(h => h.Key.Equals("x-zumo-auth", StringComparison.InvariantCultureIgnoreCase));
string token = auth_header.Value.FirstOrDefault();
if (!string.IsNullOrEmpty(token))
{
var jwtToken = new JwtSecurityToken(token);
if (jwtToken != null)
{
_userSid = jwtToken.Subject;
}
}
}
return _userSid;
}
}
I use it instead of getting this from ClaimPrinciple as per manual. I checked the Mobile App Server code does a very similar thing.
2. Idea.
Azure Mobile Apps have this parameter:
MobileAppsManagement_EXTENSION_VERSION it is recommended to set to latest. I think if we downgraded it to previous version it would work until Microsoft finds and solves the problem. The only issue is that I do not know and could not find the version number. May be someone knows and can post here?

PHPMailer no longer working on GoDaddy

We have set up PHPMailer on our GoDaddy hosted website. We are aware of the particular settings GoDaddy requires in order for the plugin to work so we used those.
$m = new PHPMailer;
$m->isSMTP();
$m->Host = 'relay-hosting.secureserver.net';
//$m->SMTPDebug = 2;
$m->Port = 25;
$m->SMTPAuth = false;
$m->SMTPSecure = false;
$m->CharSet = "UTF-8";
$m->From = 'ouremail#godaddydomain.fm';
$m->FromName = 'OUR COMPANY';
$m->AddAddress($userEmail);
This worked perfectly for months, but about a week ago we started getting:
Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
We haven't touched the code for months so it's not something we changed.
Has anyone run into this issue in the last couple weeks? Any ideas on how to solve it? I've been on customer support with GoDaddy for 45 minutes and that did not help at all.
Thanks
After spending 3 hours! in chat with customer service, the only thing that helped was them sending me a sample form that used PHPMailer to send an email. After reading the code I realized that they are using an old version of PHPMailer. If you use the latest version it just doesn't work.
The version that works is 5.1. Host needs to be set to 'localhost'.

SPLimitedWebpartManager resetting custom web part properties on SaveChanges

We are running a SharePoint 2013 publishing site in 2010 mode. A section of the code which used to work fine in 2010 is not working after I installed the SharePoint 2013 CTP update (Configuration database version:
15.0.4815.1000).
I am trying to add a custom webpart with custom properties. The below code adds the webpart to the correct zone but when SPLimitedWebPartManager.SaveChanges(webpart) executes, it resets the custom property values to default values.
var wpManager = web.GetLimitedWebPartManager(page.ListItem.Url, System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared)
var dsWebPart = new DocumentSetBridge()
{
Title = "Shared Resource(s)",
ChromeType = System.Web.UI.WebControls.WebParts.PartChromeType.None,
KnowledgeCenterAssetsLibraryItemId = documentSetUniqueGuid,
ID = KnowledgeCenterSettings.DocumentSetBridgeWebPartId,
ShowManageDocLink = true,
IsUserCommunityDS = true
};
wpManager.AddWebPart(dsWebPart, UserGroupSettings.DOCUMENTSET_WEBPART_ZONE_ID, UserGroupSettings.DOCUMENTSET_WEBPART_ZONE_INDEX);
Any help is much appreciated. Thanks in advance.
Senthil S
UPDATE: Found the issue with permissions. It creates a new page with pre-defined webparts and assigns the user manage rights just for the page. Eventhough, the page is updated with proper permissions, it seems like SP is not recognizing it until sometime later. It could be because of some timing issue. If I add the web part impersonating as an admin everything looks fine.
After adding the WebPart to the SPLimitedWebPartManager you should do the following
wpManager.SaveChanges(dsWebPart);
web.Update();
and/or use SetPersonalizationDirty() like
dsWebPart.SetPersonalizationDirty();

How to open default browser in windows store 8.1?

I have an app needs to open a browser and link to the address that I want. My project is coded on windows 8.1. I have research on google but I couldn't find any solutions.
This code below is good when dev in Windows Phone:
Launcher.LaunchUriAsync(new Uri("link"));
But in tablet,it made my app hidden and didn't do anything else.
Please give me any solutions for this problem. Thanks
Please try below code. I have checked and its working fine.
LauncherOptions options = new LauncherOptions();
options.DisplayApplicationPicker = true;
options.TreatAsUntrusted = true;
var success = await Launcher.LaunchUriAsync(new Uri("Your Link"), options);
Here, if you remove options.DisplayApplicationPicker=true then it will open default browser. I added that line because it helps user to select different apps each time.

SharePoint 2010 Client Object Model - Proxy Authentication Required

All,
A small but irritating issue.
I am trying to create a DLL that uses the Client Object model to change a Site Tile
Microsoft.SharePoint.Client.ClientContext myCContext = new Microsoft.SharePoint.Client.ClientContext(lsiteurl);
System.Net.NetworkCredential ReqCredential = new NetworkCredential("user", "pwd", "domain");
System.Net.WebProxy ReqProxy = new System.Net.WebProxy("IP:8080", false);
myCContext.Credentials = ReqCredential;
ReqProxy.Credentials = ReqCredential;
WebRequest.DefaultWebProxy = ReqProxy;
//GlobalProxySelection.Select = ReqProxy;
Microsoft.SharePoint.Client.Web lWeb = myCContext.Web;
myCContext.Load(lWeb);
lerror = "Load SPWeb";
myCContext.ExecuteQuery();
But What I try, Every time it throws an exception on the myCContext.ExecuteQuery()
Every time the same error "407 Proxy Authentication Required", please help me resolve this issue
the solution in How do I pass my proxy credentials to a SharePoint Client Context object...? (SharePoint Client Object Model) does nothing, even the creating the new Network credentials, Proxy, ...
Thx for any help
If you go in to your internet options -> connections -> Lan settings in internet explorer you should be able to get your proxy settings from there
in your web config the same as the above link
<system.net>
<defaultProxy>
<proxy proxyaddress="address:port" bypassonlocal="True" />
</defaultProxy>
</system.net>
Give the application pool that your site resides on a recycle or a IISreset and see if this does the trick.
This resolved the same issue you are currently experiencing
Also check the you are doing this in the correct web config, Sounds stupid but i have seen people do this before.

Resources