You are here:   Forum
Register   |  Login

Forum Notice

For new Visual Studio LightSwitch questions,
It is recommended that you use the official Visual Studio LightSwitch Forums at
:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


Forums

oData using Basic authentication
Last Post 16 Jul 2012 04:22 PM by Bill. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
BillUser is Offline
New Member
New Member
Send Private Message
Posts:3
Avatar

--
16 Jul 2012 04:22 PM
    I am trying to access LightSwitch oData using Basic authentication but continue to have issues.

    The code is listed below:
    var serviceCreds = new NetworkCredential("username", "password");
                var cache = new CredentialCache();
                var serviceUri = new Uri("https://hub.website.com/ApplicationData.svc/");
                cache.Add(serviceUri, "Basic", serviceCreds);
                
                var odataService = new ApplicationData(new Uri("https://hub.website.com/ApplicationData.svc/"));
                odataService.Credentials = cache;
     
    var localitmItems = odataService.mkgKeywords;

    The error is:
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
    You are not authorized to post a reply.


    Latest Microsoft Visual Studio LightSwitch Forum Threads That Have Answers

    I'm compelled to Save twice when using a Details screen. I am inserting images and document as follows... 1.) Enter Password (Modal Dialog) 2.) Enter password values (PasswordBox Custom Control) 3.) OK (Command) EnterPasswordOKMethod_Execute compares password text and confirm text if both strings are the same the password text is bound to 4.) (PasswordBox Custom Control) and Modal Dialog is closed. 4.) Password text appears obfuscated in (PasswordBox Custom Control) 5.) Save is selected (and fails) 6.) LightSwitch displays an "Unable to save data" dialog with "Please correct data entry errors and try to save again." OK is selected to dismiss the Unable to save data dialog. 7.) Save is selected again and the data entered into the New Password Record Details screen is saved. ?.) (Button Custom Control) will be used to peek at password but at this time only displays a ShowMessageBox // NOTE: * I use SQL Management Studio to
    Read more...

    I have a property on a HTML screen which is set to date. It displays the date time picker in the popup but when I close the popup with a button I would like to convert the date time from the picker to text format mm/dd/yyyy and I can not seem to find the proper javascript code to convert it. Is there any examples that some one could point me to. thanks leonard
    Read more...

    I will be publishing a 3-tier SL client web application using the publish wizard.  The application uses an external sql server database; no intrinsic database tables other than for security.  My external db connection string correctly appears in the "Attached Data Sources" tab.  What I would like to do is to have LightSwitch create the application security tables in the same external database that holds the application data.  I am unclear on what I need to do to achieve this.  Do I input the connection string to the external db in the "Specify the user connection" field?  Do I check the "Publish database schema" box and add a different connection string with db administrator permissions?  The only schema elements I want from lightswitch are the security tables, so I am hoping that this will update the external db and NOT delete any existing tables.  Your guidance is
    Read more...

    Hi, I made a small Lightswitch project with a Silverlight 5 UserControl. In the UC now i need a Storyboard and a DataTrigger, so I added the assemblies: * Microsoft.Expression.Effects 5.0.5 * Microsoft.Expression.Interactions 5.0.5 * System.Windows.Interactivity 5.0.5 in the UC I have: xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ia="http://schemas.microsoft.com/expression/2010/interactions" xmlns:e="http://schemas.microsoft.com/expression/2010/effects" and I define: <i:Interaction.Triggers> <ia:DataTrigger Binding="{Binding Blink}" Comparison="Equal" Value="true"> <ia:ControlStoryboardAction Storyboard="{StaticResource StoryBoardAlertRed}"/> </ia:DataTrigger> </i:Interaction.Triggers> when I start the project I get an annoying error: translated to english it is: the attachable property
    Read more...

    Using HTML Client A Tile List has an Item Tap event. I want to set a query parameter of a second query using the selected item in the tile list. Basically I have two queries that have a 1 to 1 relationship. The primary key of the selected item is to be used to select the record in the second query. The only parameter passed to me in the Item Tap event is the screen object. I need the Javascript syntax to get at the selected item's key field. I've created an local property data item to hold the second query's parameter. If I set that property to the correct value, it should find the related record in the second table. In other words I want the selection to cause the second query to do a related lookup. Thomas H. Lanier
    Read more...

    1234

    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation