Search Results

Search found 18 results on 1 pages for 'christo'.

Page 1/1 | 1 

  • Send large JSON data to WCF Rest Service

    - by Christo Fur
    Hi I have a client web page that is sending a large json object to a proxy service on the same domain as the web page. The proxy (an ashx handler) then forwards the request to a WCF Rest Service. Using a WebClient object (standard .net object for making a http request) The JSON successfully arrives at the proxy via a jQuery POST on the client webpage. However, when the proxy forwards this to the WCF service I get a Bad Request - Error 400 This doesn't happen when the size of the json data is small The WCF service contract looks like this [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)] [OperationContract] CarConfiguration CreateConfiguration(CarConfiguration configuration); And the DataContract like this [DataContract(Namespace = "")] public class CarConfiguration { [DataMember(Order = 1)] public int CarConfigurationId { get; set; } [DataMember(Order = 2)] public int UserId { get; set; } [DataMember(Order = 3)] public string Model { get; set; } [DataMember(Order = 4)] public string Colour { get; set; } [DataMember(Order = 5)] public string Trim { get; set; } [DataMember(Order = 6)] public string ThumbnailByteData { get; set; } [DataMember(Order = 6)] public string Wheel { get; set; } [DataMember(Order = 7)] public DateTime Date { get; set; } [DataMember(Order = 8)] public List<string> Accessories { get; set; } [DataMember(Order = 9)] public string Vehicle { get; set; } [DataMember(Order = 10)] public Decimal Price { get; set; } } When the ThumbnailByteData field is small, all is OK. When it is large I get the 400 error What are my options here? I've tried increasing the MaxBytesRecived config setting but that is not enough Any ideas?

    Read the article

  • Single Sign On with Forms Authentication

    - by Christo Fur
    I am trying to set up Single sign on for 2 websites that reside on the same domain e.g. http://mydomain (top level site that contains a forms-auth login page) http://mydomain/admin (seperately developed website residing in a Virtual Application within the parent website) Have read a few articles on Single Sign on e.g. http://www.codeproject.com/KB/aspnet/SingleSignon.aspx And they seem to suggest it is just a case of having the same machinekey section in each web.config so that the cookie encryprion and decryption is the same for each application I have set this up and I never get prompted for credentials in the sub-website (the virtual application) I always get prompted in the parent site. In addition to having the same machinekey I've also tried adding the same <authentication> and <authorisation> elements Any idea what I could be missing?

    Read the article

  • Asp.net Dynamic Data - Field not rendered on List page

    - by Christo Fur
    I have created a Dynamic Data site against an Entity Framework Model I have 2 fields which are nvarchar(max) in the DB and they do not get rendered on the list view This is probably a sensible default But how do I overide this? Have tried adding various attributes to my MetaData class e.g [ScaffoldColumn(true)] [UIHint("RuleData")] But no joy with that Any ideas?

    Read the article

  • WCF - Increase ReaderQuoatas on REST service

    - by Christo Fur
    I have a WCF REST Service which accepts a JSON string One of the parameters is a large string of numbers This causes the following error - which is visible by tracing and using SVC Trace Viewer There was an error deserializing the object of type CarConfiguration. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Now I've read all sorts of articles advising how to rectify this All of them recommend increasing various config settings on the server and client e.g. http://stackoverflow.com/questions/65452/error-serializing-string-in-webservice-call http://bloggingabout.net/blogs/ramon/archive/2008/08/20/wcf-and-large-messages.aspx http://social.msdn.microsoft.com/Forums/en/wcf/thread/f570823a-8581-45ba-8b0b-ab0c7d7fcae1 So my config file looks like this <webHttpBinding> <binding name="webBinding" maxBufferSize="5242880" maxReceivedMessageSize="5242880" > <readerQuotas maxDepth="5242880" maxStringContentLength="5242880" maxArrayLength="5242880" maxBytesPerRead="5242880" maxNameTableCharCount="5242880"/> </binding> </webHttpBinding> ... ... ... <endpoint address="/" binding="webHttpBinding" bindingConfiguration="webBinding" My problem is that I can change this on the server, but there are no WCF config settings on the client as its a REST service and I'm just making a http request using the WebClient object any ideas?

    Read the article

  • Problem with Json Date format when calling cross-domain proxy

    - by Christo Fur
    I am using a proxy service to allow my client side javascript to talk to a service on another domain The proxy is a simple ashx file with simply gets the request and forwards it onto the service on the other domain : using (var sr = new System.IO.StreamReader(context.Request.InputStream)) { requestData = sr.ReadToEnd(); } string data = HttpUtility.UrlDecode(requestData); using (var client = new WebClient()) { client.BaseAddress = serviceUrl; client.Headers.Add("Content-Type", "application/json"); response = client.UploadString(new Uri(webserviceUrl), data); } The client javascript calling this proxy looks like this function TestMethod() { $.ajax({ type: "POST", url: "/custommodules/configuratorproxyservice.ashx?m=TestMethod", contentType: "application/json; charset=utf-8", data: JSON.parse('{"testObj":{"Name":"jo","Ref":"jones","LastModified":"\/Date(-62135596800000+0000)\/"}}'), dataType: "json", success: AjaxSucceeded, error: AjaxFailed }); function AjaxSucceeded(result) { alert(result); } function AjaxFailed(result) { alert(result.status + ' - ' + result.statusText); } } This works fine until I have to pass a date. At which point I get a Bad Request error when the proxy tries to call the service I did have this working at one point but have now lost it. Have tried using JSON.Parse on the object before sending. and JSON.Stringify, but no joy anyone got any ideas what I am missing

    Read the article

  • Forms authentication ignored in virtual application

    - by Christo Fur
    I have an admin site swet up as a virtual applcation inside of another website. I would like visitors to the sub directory (the virtual application) to be promtped for credentials using the same Forms autheentication set up on the main parent site Have tried all sorts of things but can't get it to work including Removing all ,, and sections from the virtual-app web.config Copying the same ,, and sections from the parent to the virtual-app web.config Using a virtual directory instead of virtual application But I never get promted for credentials Anyone know how to get this setup? thanks

    Read the article

  • Error in loading component property (Swing GUI Forms)

    - by Christo Du Preez
    For no apparent reason all my Swing GUI forms using components linked to org.jdesktop.beansbinding.Converter started generating errors when trying to open the Design View: Error Error in loading component property: [JPanel]-filterTextField-converter. Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Errors occurred in loading... I'm currently using Netbeans 6.8. I opened my project in Netbeans 6.7.1 and all was fine but after a while the same thing happened. Looking at the .form and .java files and comparing it to previous backups, everything looks fine. Even my Netbeans tutorial project no longer works. What can cause this. Any suggestions would greatly be appreciated. After further investigation this is taken from my IDE's log : INFO: msg org.openide.ErrorManager$AnnException: msg at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:867) at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:230) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:240) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2362) at org.netbeans.modules.form.GandalfPersistenceManager.loadProperty(GandalfPersistenceManager.java:2041) at org.netbeans.modules.form.GandalfPersistenceManager.loadBindingProperties(GandalfPersistenceManager.java:2627) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:900) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:979) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadNonVisuals(GandalfPersistenceManager.java:695) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:529) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:290) at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:339) at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:287) at org.openide.util.Mutex.doEventAccess(Mutex.java:1355) at org.openide.util.Mutex.readAccess(Mutex.java:317) at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:272) at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:337) at org.netbeans.modules.form.FormEditor.loadForm(FormEditor.java:266) at org.netbeans.modules.form.FormEditorSupport.loadForm(FormEditorSupport.java:306) at org.netbeans.modules.form.FormEditorSupport$3.run(FormEditorSupport.java:457) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.lang.ClassNotFoundException: Will not load class org.jdesktop.beansbinding.Converter arbitrarily from one of ModuleCL@738d08[org.jdesktop.beansbinding] and ModuleCL@167e3a5[javax.beans.binding] starting from SystemClassLoader[556 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:241) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:95) at org.netbeans.modules.form.FormUtils.loadClass(FormUtils.java:1445) at org.netbeans.modules.form.PersistenceObjectRegistry.loadClass(PersistenceObjectRegistry.java:95) at org.netbeans.modules.form.GandalfPersistenceManager.getClassFromString(GandalfPersistenceManager.java:5516) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2348) ... 27 more msg Error in loading component property: Other Components-mainPanel-jTextField1-converter Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Can someone please help me with this issue. This is still not resolved and not being able to edit my Forms or loosing binding properties every time I need to edit a Form is a real pain and time consuming! Any help would greatly be appreciated. Thanx.

    Read the article

  • JComponent undock effect

    - by Christo Du Preez
    I'm trying to accomplish an undock effect for a custom Swing JComponent. By default the component is used inside a form along with other components. I want to be able to maximize this component to use the whole screen and then be able to dock it again. So far I've tested public void showDialog() { JFrame mainFrame = App.getApplication().getMainFrame(); JDialog dialog = new JDialog(mainFrame); dialog.setModal(true); dialog.setSize(800, 600); //Set to 80x660 for now dialog.add(this); //This is my JComponent dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setVisible(true); } This gives me desired effect but when closing the dialog my component doesn't receive events no more. How can I prevent this? Or is there perhaps a better way to accomplish this?

    Read the article

  • String Comparison containing hyphens not matching

    - by Christo Fur
    I have a method in a url rewriting module that looks like this public bool Match(Uri url) { string x = url.PathAndQuery.ToLowerInvariant(); string y = RuleData.ToLowerInvariant(); return x.Contains(y); } However, it is not returning true for the following values: x = "/xx09-02-09xx"; y = "09-02-09"; but if I write a unit test with the raw strings, like below, it does return true [Test] public void Contains() { string x = "/xx09-02-09xx"; string y = "09-02-09"; Assert.IsTrue(x.Contains(y)); // this returns true } What could be the difference? The encoding? The culture? Have tried removing the ToLowerInvarient(), but that makes no difference have tried all the following in the Match method bool contains = x.Contains(y); bool contains1 = x.IndexOf(y) != -1; bool contains2 = x.IndexOf(y, StringComparison.OrdinalIgnoreCase) != -1; bool contains3 = x.IndexOf(y, StringComparison.InvariantCultureIgnoreCase) != -1; bool contains4 = x.IndexOf(y, StringComparison.CurrentCultureIgnoreCase) != -1; but none return true for those values, when run in the rewrite module. But they do in the unit test. So something about the strings is clearly different any ideas?

    Read the article

  • Post data to JsonP

    - by Christo Fur
    Hi Is it possible to post data to JsonP? Or does all data have to be passed in the querystring as a GET request? I have alot of data that I need to send to the service, cross doamin, and it is too large to send via the querystring What are the options for getting around this? thanks

    Read the article

  • Evenly distibuted scatterViewItems that dont overlap

    - by Christo Fur
    Hi I have an app that creates a variable number of ScatterviewItems based on which tagged object is placed on the surface table. The ScatterViewItems are added programatically to the ScatterView based on info looked up in a DB The Scatterview does a good job of displaying this info However, I would like them to be evenly distributed across the table and not have any items overlapping Any ideas how to do that?

    Read the article

  • prevent _doPostBack getting rendered in button markup

    - by Christo Fur
    Hi Is it possible to prevent the _doPostBack() call getting rendered on a button? I would like add some custom logic prior to calling the postback. I have added an onClick event to the button e.g. <button id="manualSubmit" runat="server" class="manual-submit" onclick="$('#jeweller-form').hide();" /> However, this just gets rendered inline before the _doPostBack() But the postback gets fired before the jQueryHide takes place I would like to call my own JS function then manually trigger the postback any ideas?

    Read the article

  • What most efficient method to find a that triangle which contains the given point?

    - by Christo
    Given the triangle with vertices (a,b,c): c / \ / \ / \ a - - - b Which is then subdivided into four triangles by halving each of the edges: c / \ / \ ca / \ bc /\ - - - /\ / \ / \ / \ / \ a- - - - ab - - - -b Wich results in four triangles (a, ab, ca), (b, bc, ab), (c, ca, bc), (ab, bc, ca). Now given a point p. How do I determine in which triangle p lies, given that p is within the outer triangle (a, b, c)? Currently I intend to use ab as the origin. Check whether it is to the left of right of the line "ca - ab" using the perp of "ca - ab" and checking the sign against the dot product of "ab - a" and the perp vector and the vector "p - ab". If it is the same or the dot product is zero then it must be in (a, ab, ca)... Continue with this procedure with the other outer triangles (b, ba, ab) & (c, ca, ba). In the end if it didn't match with these it must be contained within the inner triangle (ab, bc, ca). Is there a better way to do it?

    Read the article

  • ASP.net repeater, scroll 3 at a time

    - by Christo Fur
    I have a list of data that I need to display in a web page 3 at a time The first needs to be displayed in a div called "left" , the second in a div called "centre" and the third in a div called "right". And I need to be able to scroll through the data with a pager. And so the next 3 results will be displayed in a similar way, and so on till the end of the data set Obviously the alternating templates in the repeater are not suitable for this. Is there a smarter way to achieve this?

    Read the article

  • How to implement an ItemsControl3D which can use templates of Visual3D?

    - by Christo
    I'm looking for something like a ContainerUIElement3D which supports the ItemsSource property and an ItemTemplate property which I can use within a Viewport3D. My aim is to be able to write something like: <ItemsControl3D ItemsSource="{Binding Path=MyItems}"> <ItemsControl3D.ItemTemplate> <DataTemplate3D> <!-- My template which defines the binding to each item. --> <DataTemplate3D> </ItemsControl3D.ItemTemplate> </ItemsControl3D> I'm looking for tips on how to implement this. The first tricky part is to create a DataTemplate3D which can construct the Visual3D needed to add to the ItemsControl3D. I've been using .NET reflector to browse through the implementation of ItemsControl and DataTemplate, but I soon realised that I don't have a deep enough understanding and enough time to come up with a solution on my own.

    Read the article

  • Accessing web Service from jQuery - cross domain

    - by Christo Fur
    Hi I am trying to acess a wcf service from a jQuery client Specifically this example http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#4 All works well when the client webpage is on the same domain as the service As soon as I move the client webpage to another domain it breaks. It cant reach the service and the request fails This happens for all the examples, ASMX, REST and WCF any ideas how to get this working cross daomain?

    Read the article

  • How to color a mesh with values at the vertices in WPF 3D?

    - by Christo
    We've got a sphere which we want to display in 3D and color given a fuction that depends on spherical coordinates. The sphere was triangulated using a regular grid in (theta, phi), but this produced a lot of small triangles near the poles. In an attempt to reduce the number triangles at the poles, we've changed out mesh generation to produce more evenly sized triangles over the surface. The first triangulation method had the advantage that we could easily create a texture and drape it over the surface. It seems that in WPF it isn't possible to assign colors to vertices the way one would go about in OpenGL or Direct3D. With the second triangulation method it isn't apparent how to go about generating the texture and setting the texture coordinates, since the vertices aren't aligned to a grid anymore. Maybe it would be possible to create a linear texture containing a color for each vertex, but then how will that effect the coloring? Will it still render smoothly over the triangle surfaces as one would expect by applying per vertex coloring?

    Read the article

  • What experience is the most valued in a programmer?

    - by Christo
    I've been coding application level software for a while now. I've had some experience with internet (server/client based) applications, but that has been fairly scant. The field doesn't scare although I know that experience can be almost be measured in gold. I see myself as a highly qualified and experienced programmer, but I also see my short comings in these fields. Does this count against me (and others like me?) and would this cut anyone from obtaining the shortlist or are there other factors which bear more weight?

    Read the article

1