Install Profile Service - Profile Installation Failed (Get UDID from iOS) - c#

So I followed this tutorial on how to get the UDID from a iOS device using ASP.NET and C#. I got the .mobileconfig working and it loads up on the iPad. My problem is now though, that when ever I hit "Install" (See picture below) it gives me the error "Profile Installation Failed" - "Invalid Profile".
I can see the iPad visits my page and gives me the UDID, but I can't seem to find a page that shows me what the iPad wants back.
Right now i'm just returning some xml, but that doesn't work:
<plist version="1.0">
<key>status</key>
<string>OK</string>
</plist>
Here is the .mobileconfig im using

After searching high and low I found this comment by Lakitu which said to do a 301 redirect.
If anyone is interested here is the code I used for redirecting:
context.Response.Status = "301 Moved Permanently";
context.Response.AddHeader("Location", "/device/enroll.aspx");
context.Response.End();
I read that you needed to redirect to a directory, but any file seems fine.
Happy coding!

Related

The requested url was rejected

I am working on a simulation site using selenium .
I launched on a server to start testing it,
after a will the targeted url is giving this error message while it is navigated to by chrome
The requested URL was rejected. Please consult with your administrator.
Your support ID is: 8410459054496748680
I tried to navigate to this site as a user and cleaned my browsing history and cache
and it keeps giving me this error
You are block by a firewall ASM.
The data you are trying to pass are detected as threats and your request is denied. You need to resolve this with you Network engineer by providing him the ID.
NOTE: Cookies cleanup might also work sometimes!

AjaxControlToolKit HTMLExtender ImageUpload works on localhost, not server

So, I've looked over everyone's questions, and I can't seem to find a reliable answer. I find it hard to believe that AjaxControlToolKit would release an item that couldn't work on a public facing website. So here's my question.
My AjaxControlToolKit HTMLExtender ImageUpload function works SWIMMINGLY on my localhost when I test, but the moment I test on the live address (which is behind a login in a custom CMS), I can't get the file to post to the server. I have the same .dlls, the same web.config, the same everything, but I get this response in Chrome Inspector:
Uncaught error raising upload complete event and start new upload
t.onreadystatechange
Any suggestions on where to start?

Xamarin Google Play Map Services Error 400 Bad Request

I've attempted to follow tutorials for both Xamarin (http://docs.xamarin.com/guides/android/platform_features/maps_and_location/maps/part_2_-_maps_api/), and Google Play (it is in the Google Play Services getting started page on Xamarin Studio) to get a working maps example.
Back in December, a friend of mine used my phone to develop a map app using his own laptop. However when I tried compiling his code on my computer, I was getting the same error below. I don't have another android phone to test with, but I can't figure out why it isn't working. I imagine the error lies within my target sdk, which is 19. The API key I'm using is provided from Google and pasted it in like the tutorials say, so I don't think that's the issue. So the issue must lay within the SDK I have, or my computer. I'm just not sure how to test it or further debug it.
The error being spit out over and over again until I leave the page is this:
[AndroidHttpClient$2] executeRequestSending() director.getClass()=class org.apache.http.impl.client.DefaultRequestDirector [AndroidHttpClient$2] executeRequestSending()#finished <<<<< nafResponseWrapper=NafResponseWrapper [httpResponse=HTTP/1.1 400 Bad Request, usedCipherSuiteAndroidName=TLS_ECDHE_RSA_WITH_RC4_128_SHA] [AndroidHttpClient$2] execute() finalHttpResponse.getStatusLine()=HTTP/1.1 400 Bad Request [AndroidHttpClient$2] execute()#finished
Turns out the package name was wrong when signing up for the API key. The hidden in the flood of messages about the 400 bad request.
Silly mistakes and such. I feel silly for making this post honestly.

Twitter Bootstrap (MVC 4 package) on App Harbour

I've just uploaded a sample twitter bootstrap app to app harbor using the sample mvc 4 nuget package and am getting the following javascript error when clicking on any of the buttons at the top of the sample landing page:
Uncaught SyntaxError: Unexpected token *
Everything works fine locally and I've checked that all the files I've got locally are in my bitbucket repo.
All files are being request and and returned correctly with statuses of 200.
I have tried this in chrome and IE. Same problem.
Anyone got any ideas why this might be happening on APPHB but not locally?
Ok, I found the answer to this problem. The outline of the issue can be found on:
http://bugs.jquery.com/ticket/13274
It's to do with how the minifier deals with //# sourceMappingURL=jquery.min.map
These "comments" are useful for debugging minified js files as they give you a link back to the unminified version but they seem to cause a problem with the minifier.
You've got two option to solve this. Either remove the lines completely. Or escape them with block comments like:
/*
//# sourceMappingURL=jquery.min.map
*/
Instead of the default:
//# sourceMappingURL=jquery.min.map

Google-drive example: oauth2callback not found

I need a little help with the C# example program of Google-Drive...
I used this so-called "tutorial"/"example":
https://developers.google.com/drive/examples/dotnet
And the code from here:
https://code.google.com/p/google-drive-sdk-samples/source/checkout
I uploaded my (only slightly modified) sourcecode here in case anybody doesn't have Mercurial (I didn't have Mercurial and no admin rights to install it either, and Mercurial is the only way to get the sourcecode...):
http://verzend.be/elt0k13enraw/DrEdit.rar.html
I always get
"Ressource cannot be found"
Requested URL: /oauth2callback
I don't find this astonishing, as no oauth2callback controller or handler is implemented...
I tried adding a Controller called oauth2callbackController and redirecting to another action in oauth2callbackController.Index, doing
return new RedirectResult("/about/about");
But that only creates a NULL-reference exception.
So i figured, maybe the wrong controller and redirected to
return new RedirectResult("/drive/Index");
But that only creates an infinite loop of redirect -> allow -> redirect - allow -> etc.
BTW, the config to change the API key + REDIRECT_URI is in
Models\ClientCredentials.cs
Note:
The problem aren't my modifications.
The sample also didn't work unmodified, with the exact same error.
All I did was removing EntityFramwork references, and throwing "Not implemented exception" when a method using entity was called.
Edit:
Additional information:
What I really wanted to do in the first place is to write a console service that exports my database, LZMA-compresses the exported content, encrypts that with OpenPGP, and uploads the database of my server to Google drive every day at 24:00 o'clock, without any user input.
I got export working without a problem, i got the LZMA compression working without a problem, I got the encryption with PGP working without a problem.
After the end of the working day (grrrr), when I was at home, I was even able to download the example-code with the mercurial installed on my Linux-machine at home, and bring it on the windows machine using SMB...
But now I can't get the sample for the Google-drive SDK working...
And moreover, what I really need is an example for a console service/daemon, not a web-application.
When I created the API key, I saw one could create a key for a service, but there is no example on how to write a Google-Drive service (console application), and no useful documentation as well (yea there is a reference, but it's only a reference, IntelliSense provides about the same)...
When configuring your app in the API Access tab of the APIs Console, you had to set the root (/) of your web server as the redirect URI and not /oauth2callback.
Assuming that your app is published at www.example.com, just go back to the APIs Console and set it to www.example.com instead of www.example.com/oauth2callback

Categories

Resources