.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

AutoGenerateSelectButton="False" ignored when using Domain Service

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

Crosspost from RIA Services forum: http://forums.silverlight.net/forums/t/196466.aspx

I'm creating a Dynamic Data application in VS2010 and have recently switched to using a Domain Service to give greater control over the data presented to the client. I've noticed that the AutoGenerate<Action>Button attributes on my GridView are being ignored. The presence of the Edit and Delete buttons appear to be contingent on the existence of Update and Delete methods on the partial classes autogenerated in the Domain Service, but i'm not seeing how to control the generation of the Select button. Is there a way to control this from within the Domain Service class?

View Complete Post

More Related Resource Links

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in Silverlight without bind to any datagrid and other control? Please help.chanmm

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in silverlight without binding to any datagrid and so? Please help.  chanmm

Customizing pages with Asp.Net Dynamic Data Domain Service Web Applications?

Hola, It used to be so easy creating new folder under CustomPages with the (Entity/Table name) and copying on it all base default PageTemplates (Details, Insert, Edit, List and ListDetails) and you will get access to those pages only for the specific table (this was the default automatic behavior of the Dynamic Data framework) When it comes to be using Asp.Net Dynamic Data Domain Service Web Applications it seems that we need to learn a new way of doing this because it is just simply different and you got a lot of errors when compiling your application if you do this the old way? What might be the new way, uh? HOW DO WE DO THIS NOW ... I MEAN ... CREATING DEFAULT CUSTOM PAGES FOR SPECIFIC TABLES (Details, Insert, Edit, List and ListDetails) with Asp.Net Dynamic Data Domain Service Web Applications? The problem arises when the definition for your newly created classes is absent from the automatically generated code when you created your domain service !!!!! . If you simply copy the PageTemplates as they are, you got a duplicated error message because the new .designer file (automatically generated) conains the definition of the class you are copying (not the newer one) so even if you rename your .aspx file the result is not what you would normally expect (the .designer class is not regenerated after renaming). The .designer file keeps the domain service definition and if y

Cannot INSERT record using Asp.Net Dynamic Data Domain Service Web Applications

 Hi, I am working on a 'Asp.Net Dynamic Data Domain Service Web Application' project using just 2 tables, FAQ_Categories and FAQs. The FAQs table has a foreign key to the FAQ_Categories. The steps are straight forward. Add a new project (Asp.Net Dynamic Data Domain Service Web Applications) Add folders Model ( for Linq2Sql datacontext), Domain (for the Domain Services class) Add Linq2Slql and add the 2 tables to the designer. Build the project. Add the Domain Service Class to the Domain folder. in the wizard select the DataContext, uncheck the Enable Client & Expose ODate checkbox Check bothe table & their corresponding Enable Editing tables checbox Check the Generate Metadata class Click OK. In Global.asax set Scaffold to true and add the DomainService name. Build and run.   Pages List and Detail are working fine. But if I try to insert a new record, I get the error "FaqId is required" Faq_ID is the primary key in the database table and it is set to Identiy. The Datacontext is correct, it marked the FAQ table with <Global.System.Data.Linq.Mapping.ColumnAttribute(Storage:="_CustomerId", AutoSync:=AutoSync.OnInsert, DbType:="Int NOT NULL IDENTITY", IsPrimaryKey:=true, IsDbGenerated:=true)> _   I tried this using Linq2Sql, Entity Framework, And both in VB and C# with the same result. I am using VS20

User Profile Service - "The specified user or domain group was not found"

Hi there, I had configured the User Profile Service and all was working well (Syncing with AD etc.). However, something has gone wrong. The services still appear to be running; both Forefront Identity Manager services are running, and the services show as 'Started' in Central Administration. The 'My Profile' and 'My Site' options have disappeared though, and browsing to the My Sites page results in an error (Could not load user profile). To make matters much worse, it seems to have also broken the Central Administration site. If I try and go to 'Manage Service Applications' I get another error (The specified user or domain group was not found). This error seems to come up on around half of the pages on the Central Administration site. Looking up the error (abb6b174-0f71-413a-a27a-41cdc87b66d0) in the logs I find this: 09/06/2010 15:35:45.44  w3wp.exe (0x0868)                        0x06A0 SharePoint Portal Server       User Profiles                  cm6y High     User Profile Application Proxy failed to retrieve partitions from User Profile Application: Microsoft.Office.Server.UserProfiles.UserProfileA

WF Service and Silverlight Cross domain exception

Hi I have created a workflow service (xamlx) and hosted it on IIS. The web.config file of the service is: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <services> <service name="VacationRequestService"> <endpoint contract="IVacationEntry" binding="wsHttpBinding"/> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests

How to configure secure communication between web client in DMZ and WCF-service in domain



I have a question regarding security in this scenario:

In the DMZ I have an server hosting my Web application. I'm using HTTPS between the user/browser and my web application (using certificate).

My web application is supposed to communicate with a service behind the firewall (inside the domain) hosted in IIS 7.
I'm using wsHttpBinding between my web application and the WCF-service.If I have this security configuration everything works fine:

<binding name="WSHttpBinding_ServiceLong" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:30" <br/>

cross domain error in self hosted wcf service




I get this error when trying to access a self hosted wcf service...

An error occurred while trying to make a request to URI 'http://localhost:2363/Service1.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.

Can someone please explain what I need to do to get this to work, I do not have any cross domain policy file. And don't know how that is supposed to look like.

How to update Domain Service from Entity Data Model?


Hi guys,

So I'm using Entity data model to reflect my database and I generate Domain service from my Entity data model.

I understand that if I have changes in my database, I can just choose "Update Model from Database", but there is no "Update Domain service from Model" option available.

How should maintain my domain service? I'm not going to delete away it and regenerate it whenever there are some changes, right?

I need to know what if

- I add in new table in my database, how should I update from database-->model-->domain service?

- I add in new fields in my table, how should I update from database-->model-->domain service?


WCF Client implementing a WCF Service that has [DataMember(IsRequired = false, EmitDefaultValue = fa


Let's say we have a WCF service that implements a service that returns a response defined in this data contract;

public class Response
   [DataMember(IsRequired = false, EmitDefaultValue = false)]
   public long OrderID;
   [DataMember(IsRequired = false, EmitDefaultValue = false)]
   public long ErrorID;
   <snip />

If I implement the service in a WCF client, the client's Response object creates two properties;

long OrderID;
long ErrorID;

These properties are non-nullable (since the datacontract didn't define these as nullable). Yet, since the member can be omitted, shouldn't the WCF client implement these properties as nullable?

The SOAP messages are formed according to the data contract. For example;




Hence, I would EXPECT the client to implement the properties as 'nullable'. This is not the case.

Can anybody explain why this is implemented this way?


Hosting a WCF Service on a Paid Domain

Good Day Guys

I have a WCF Service on this address

http://www.rbcprojects.co.za/webServices/emailService.svc   , after my service was working locally, i just copied the whole project to the folder in my Domain and i tried to access the svc file and i got an Error.

Vuyiswa Maseko

Get primary key values from insert page and route to details page in a Dynamic Data Domain Service A


I finally figured out how to retrieve primary key values from the insert page template that are inserted via defaults in a SQL Server database. I wanted to get the keys so that I could route the user from the insert page template to the details page template (regardless of whether it’s a custom route or not). There are a number of scenarios where separate insert and details pages are desirable, and routing from the insert page back to the list page is not desirable as Dynamic Data does out of the box. Since I could not find an answer to this problem anywhere with significant effort, I decided I would document it for others, I hope you find it useful - it turns out that it's quite simple under 10 lines of code. I also applied the same idea to a Dynamic Data Entities application which works exactly the same except for two minor changes, I have documented it below as well.

For starters, as is documented plenty elsewhere but bears repeating here, you must first annotate your Entity Data Model with ScaffoldColumn = false for identity columns and guids that get assigned with newid() in thedatabase. This tells Dynamic Data not to attempt to pass a null value from the page through to

SQL Engine Services and Domain Accounts Used as the Service Login


Looking for detailed information on what resources the MS SQL Engine reads, writes, and modifies in order to operate as designed.  Read this carefully.  I've been on the search but am not finding anything quickly.

I believe if a Windows domain account is being used for any of the SQL Engine services that account should not have any granular permission settings on any folders related to SQL operations, nor any granular settings on the registry or any where else.  Should be FULL CONTROL.  Microsoft wrote the program to run the way it does and we should not be the judge of what permissoins a service account should have so the program runs correctly.

I am troubleshooting unstable SQL issues and I am finding little tips here and there pointing in my mind to be the service account having too many restrictions on the SQL folders, Windows registry, and everything else.

My opinion would be, any domain account used as a SQL service account should have FULL CONTROLL on any folders used for SQL operations and FULL CONTROLL on registry operations and be part of NO group policies.

If anyone knows where I may find detailed information that is written in GOLD as to what permissions SQL needs to run, let me know.  Send a link.  I think there should be NO restrictions.  I haven't met anybody yet that really understand

How to update .edmx and domain service automatically? if any changes occur in View Table


I have a Age_Group Table in which its values change frequently and even I created View table. Based on Age_Group Table row's value which represent as columns in View Table. If Age_Group row's value change, new row occur or delete the rows based on that the View table is displayed. I am taking these View tables in .edmx and set domain service for that .edmx.

My query are:

Can I update the .edmx and domain service automatically? if Age_Group row's value change.

If yes, please tell me the way.


Windows Service Applications Tutorials

You can easily create services by creating an application that is installed as a service. For example, suppose you want to monitor performance counter data and react to threshold values. You could write a Windows Service application that listens to the performance counter data, deploy the application, and begin collecting and analyzing data.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Realizing a Service-Oriented Architecture with .NET

This article is meant to be a practical discussion guide to building a .NET application in a service-oriented architecture. We will consider real-world goals, real-world obstacles, and experience-based solutions. I quickly concede the approaches discussed here are not exhaustive or infallible. This paper is focused on application development, not application integration. We will specifically consider architectural issues and component design issues.

The Potential of Web Services
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend