WCF / ASMX :: Pass CGI & GET CGI Detail?
Sep 6, 2010i make a sie using perl i want pass to cgi that a query and take xml date how to run.
View 1 Repliesi make a sie using perl i want pass to cgi that a query and take xml date how to run.
View 1 RepliesI need to create master detail but the master and the detail in the form view. How to connect the parameter:
<asp:ControlParameter
ControlID="FormView1"
Name="customer_id"
PropertyName="SelectedValue"
/>
In the detail selcted parameter. And it is not working. how to pass the current record in the first form view to the detail (FormView2)
design pattern that works well with Visual Studio data tools against an MS SQL server; to retrieve a subset of an object's fields for all rows, and then on-demand retrieve the remainder for one row. I.E. just the small summary fields that I will serialize to a master grid view, then the larger properties including a large blob that I will render in a detail view. The performance hit from retrieving the large blob with the master result list would be too great.
The data shape is static, and I can define two separate data classes to match the specific summary vs. detail information returned. However that sounds anti-pattern-ish, to define the data classes specifically to suit the presentation layer. It also presents another problem, how to translate from the summary item to the detail item in an object-oriented way?
I'm trying to setup is a News module with article listing paging and article detail paging. I have a GridView with paging that lists my articles just fine. In that list, some article titles have links that direct to an article detail page by passing in the articleID to the details page. I was able to setup my details page, which uses a DetailsView control, to use paging by using an ObjectDataSource with pageIndex and pageSize parameters from the querystring. Once on my detail page, I can use my navigation arrows to move through Next and Previous articles just fine.
No matter which article I click in my article list, my detail page always starts with pageIndex 0 and thus not the article I clicked on. I understand why that is because it's going by pageIndex value instead of articleID. What I need it to do is, set the detail to whatever articleID i pass in, then allow me to navigate Next and Previous to THAT particular article instead of starting me off from pageIndex 0.
[Code]....
article on binding to a list and I've got that working fine on one view. But what I'm stuck when doing it off a master record. Everything seems to work except that when I look in the database the detail records previous associated with the current master have their Foriegn key to master set to Null and a new set of detail records have been inserted. I've got a really simple form for this object
[Code]....
The form collection comes back with the expected prefixes:
[Code]....
And the Controller.UpdateModel(master) binds all the properties correctly. But when I call dbContext.SaveChanges it issues the follow sql from sql profiler (psuedo code)
[Code]....
I've got a work around that works but it's pretty hackish and I'm currently not matching up the keys so it's dependent on everything coming back in the right order. Plus I've got to include all the fields that I want updated.
[Code]....
I thought that entity framework's code first was the culprite but I've unit test that and it works fine. I've got a feeling that UpdateModel is somehow removing and re-adding the children. Has anyone else got this to work? Of course, I could throw in the towel and parse the indexed field names myself, but I'm so close!
I've been experimenting with using EF (asp.net 3.5 sp1) with a master detail page. Using northwind as the database, I'm simply trying to have categories as master and products as detail. I have read everything I could find on the net about the where condition and it still fails with this error as soon as I click the select link in the master grid:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: A property with name 'CategoryID' does not exist in metadata for entity type 'WebAppEF01.Products'.
What strikes me is that the CategoryID column is not exposed by the EF model. That's been rolled up into the navigation element 'Categories' I suppose...but on the surface this seems to create the problem I've running in to. I've tried turning off the autogeneratewhere clause but didn't have success. The code for this page follows below.
[Code]....
I have an "Edit" page that uses a FormView bound to an EntityDataSource. The page is called with the ID field of the record to edit in the query string: "EditEmployee.aspx?ID=10". The EDS the FormView is bound to is using: AutoGenerateWhereClause=true and a QueryStringParameter. Below the FormView I have a ListView that contains some child records of the FormView. The ListView is bound to a seperate EDS and also uses the (same) QueryStringParameter.
The problem I am having is when this ListView attempts to Insert or Edt a column I receive an error because I don't have the ID field (EmployeeID) of the parent bound anywhere in the ListView (and obviously, it is setup as a ForeignKey so it fails, like it should). Any advice on the best way to get this ID (EmployeeID) column bound in the ListView? There are many things I can do in code behind, but I would like to solve this in the markup if possible. I can move the ListView so that it is inside of the FormView if necessary.
I have a Page with a FileUpload control on the top with the "Insert" button, in order to insert pictures Below that, i have a Listview showing all the pics. THis is the way i am placing my Update Panel:
[Code]....
How can i, press the INSERT button and reloads only the Content Template after INSERTING?
I have the basic Master / Detail Views working great with the default ASP.NET MVC Route; however I would like to build some URLs like this: /Class/Details/5 -- General Detail view [Working] What I'm not sure about (and I'm not tied to this URL format, just something roughly equalivent.)
/Class/5/Details/Logs -- Detail View with Logs
/Class/5/Details/Status -- Detail View with current Status
Another way to put this, is like this: /{controller}/{id}/{controllerSpecificMaster}/{action}/ What I'm trying to avoid, is cluttering up my ViewsClass directory with a bunch of Views, which are all basically derivatives of the Details view. I'm on ASP.NET MVC 1 and .NET 3.5 SP1.
I'd like to pass an object (Digital Persona featureset) to a web service. Can't seem to find a good way to serialize it.
View 4 RepliesMay I know how to pass credential to SOAP web service? I tried to assign via Proxy.ClientCredentials but seem it is read only property.
View 4 RepliesI have a WebMethod with a parameter defined as DateTime. When I call that webservice, I get this error:
[Code]....
Where 'start' and 'end' time are two javascript 'Date' objects.
how to pass credentials in url jquery
[Code]....
can Pass object in Rest Service Uri
View 1 Repliesi am working in the webservice project. I have one project when i run it then shows the text box for parameters and return the result after passing the parameters.
But another webservice does not allow me to enter the paramerters when execute then list of methods displayed and then show the soap xml when click at any method.
what difference found in both webserivces are Excuting-one that have the Text boxes: Test: "To test the operation using the HTTP POST protocol, click the 'Invoke' button."
2nd One Not provide the parameter text boxes: Test: "The test form is only available for methods with primitive types as parameters"
Dont know how to fix that. Because i want to debug the webservice and as i am unable to provide the parameter then how can i fix it.
how can i pass the parameters in the 2nd webservice as it has different information mentioned above.
In my application I want to send an audio file (.mp3) as binary string through XML webservice, and save the binary data as audio file in server. In this case what should be the structure of XML file and how can I convert this incoming binary sting to audio file in webservice code.
Currently I tried a structure like the following
<XML>
<Files>
<File>
<FileName>audio_123.mp3</FileName>
<FileType>audio</FileType>
<FileData>![CDATA[ - binary data goes here -]]</FileData>
</File>
</Files>
</XML>
But it is not working correctly.
I would like to pass xml document to a method in WCF service by client that server will get xmldocument,parse it and send back the xml response.What are best practice for thi?The xml document is conform to XSD so i would like to create managed type that represent the schema and then expose thatIf anybody has done it before or know any example please point it out so i can see it.
View 1 RepliesCannot find a simple example that will call POST a service with username pass argument.
So, how to get the length of the service.
Code:
Dim encoder As ASCIIEncoding = New ASCIIEncoding
Dim data() As Byte = encoder.GetBytes(rawresp)
Dim request1 As HttpWebRequest = CType(WebRequest.Create("http://www.sas.gr/MobileService/MobileService.asmx?wsdl&op=getCinemaMoviesProgram"), HttpWebRequest)
request1.Method = "POST"
[Code] ...
Complains about wrong bytes. I can make it work with GET but i only get the schema.
Code:
Dim request = DirectCast(WebRequest.Create("http://www.sas.gr/MobileService/MobileService.asmx?wsdl&op=getCinemaMoviesProgram"), HttpWebRequest)
request.Method = "Get"
' request.ContentLength = 0
request.Credentials = New System.Net.NetworkCredential("WSl", "WSs")
Dim response1 = DirectCast(request.GetResponse, HttpWebResponse)
Dim reader = New StreamReader(response1.GetResponseStream())
Dim rawresp As String
rawresp = reader.ReadToEnd()
This will only give the schema back, no data. Also if i reference the service there is no getCinemaMoviesProgram function to call, so I suppose it only works with post.
I want to pass some values to price method of provided webservice, but the parameter schema is like this:
[Code]....
how I must send the price parameter value? in array or as a class?
I am a newbie to ASP.NET (but not to C#)I have a project I am developing that may seem unconventional at this point but it is a project that I hope to eventually expand and provide a new type of service on the internet. Currently the project makes use of an Excel spreadsheet that is generated by another application I wrote. Basically the spreadsheet is an index to a specific type of file that exists on a host computer and the files are directly linked from within the excel document. When the link is clicked it opens the file using the operating system default program which then processes the file (this takes some time).
This is fine and dandy but when I click on another file, the default program immediately stops processing one file and opens the latest submission and thus interrupting the previous job. To prevent this I am now writing a queuing application. Here is where ASP.NET comes in. I do not want the link to open the queuing application with the file to add into the queue as a parameter because that pops one or more nnoying/scary "you are opening an executable" dialogs and because I want to be able to access the queuing service from a remote computer, and possibily in the future over the web. Instead I am trying to use an ASP.NET service application that will accept the name of a file as a parameter, access the external queue class (defined in an external dll of which only one universal instance is allowed), and add the request to the queue. Whether or not the table is an excel table or on a web page, using a form in this instance is tedious, not only for me but for a user. I want the user to be able to simply click on an html link and have the file be queued without anything except maybe a confirmation page pop up saying that the file has been queued and it will take x amount of time before the file is finished processing.
My problem is I cannot for the life of me find a way to do this. I have searched the interenet for over a week now looking for a way to call a "WebMethod" using a link and I am getting the impression that it cannot be done. Even when I use a form and try to have the form pass a string (representing the file name) as its "action" it comes up with an application error saying that I am missing the parameter I am trying to pass. Here are some examples of what I have tried:Here an example method I would try to access:
[Code]....
Here is an example of how I tried to access directly by way of a link (which results in an application error: InvalidOperationException)"
[Code]....
I have run into the issue on DataSet.WriteXml method. Apparently, if any row in a column in the DataSet has a null value, the entire column/rows will not write out in the xml file using the method DataSet.WriteXml. So, as terrible as that bug is, I need to send the data another way. Does anyone have any thoughts?
I am trying to implement WCF Method where client has to pass like "abcxyz" as a string i have to capture it and pass to my method. I am not able to do it. In our application we can split the string and we can do what ever we can do . but string comes from client site so who do i capture into my method. I am very much new in WCF.
View 1 RepliesMy WCF Client calls my WCF Service which then calls ASMX Web Service. The problem is i have configured my wcf client and wcf service to windows credentials type but when wcf service calls asmx service the user credentials (default windowsidentity) is not passed to asmx service.
In WCF Service i am able to get user identity by using : Thread.CurrentPrincipal.Identity.Name;
WCF Service - i have disabled anonymous access and enabled windows authentication. ASMX Web Service - i have disabled anonymous access and enabled windows authentication.
WCF Service Config
[Code]....
I have xml document and wanting to pass it through wcf restfull service, i am able to do that by using string format i mean i can pass the xml as string param in the restful service and it worked but now my xml document becomes huge so if i pass it as string then it gives URI long error. any way i can pass the huge xml document through the WCF RESTFul service.
View 1 RepliesMaster Detail (in the same view)
View 3 Replies