1

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".

enter image description here

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

Dumpen
  • 1,622
  • 6
  • 22
  • 36

1 Answers1

2

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!

Community
  • 1
  • 1
Dumpen
  • 1,622
  • 6
  • 22
  • 36
  • from where i have to write above? and if i want to store UDID from .mobileconfig file then how can i do this? in asp.net c# – sejal patel Feb 08 '13 at 06:56
  • You have to write a generic handler (.ashx) that sends data to the device. See http://bendytree.com/tips/Getting-an-iPhone-UDID-from-Mobile-Safari Here is how I did it: http://pastebin.com/fZEtiQMd – Dumpen Feb 12 '13 at 12:34