| Performance when using with WCF |
|
 |
Index ‹ Visual Studio 2008 ‹ ADO.NET (Pre-release)
|
- Previous
- 1
- Visual Studio Extensibility EnvDTE Visual Studio 8 (2005) -> Error _COMPlusExceptionCode = -532459699
Hi All,
I am getting the error : "The File xyz.odx is not open".
The scenario is I have added the file into the solution project using code below
project.ProjectItems.AddFromFileCopy("C:\xyz.odx"); //No error. works fine
Next, I am trying to access the xyz.odx file for editing some properties of the orchestration file using code below
ProjectItem workflow=project.ProjectItems.Item("xyz.odx");
workflow.Open(EnvDTE.Constants.vsViewKindDesigner); //Get error either here or next line
Document workflowDoc=workflow.Document; //Error observed.
EnvDTE is the latest version 8.0.0.0.
I get a COMPlus exception code: Error _COMPlusExceptionCode = -532459699
This code used to work fine in .Net 1.1 + VS2003 + BT 2004. Now the environment has been upgraded to .Net 2.0 + VS2005 + BT2006. Any idea why it fails
Please reply back if any additional info is needed.
Regards
Sujit
- 2
- Visual Studio Report Controls My query works in query analyser but freezes when i preview a reportHi guys/girls
I've got a problem with RS2000, i've generated a report, but my code freezes in RS2000 although when i run my code in Query Analyser then it works fine.
What i am trying to do is add the previous months data to the current month. when i run the query it works, but when i preview my report it just inserts the first value for all the rows
Anyway here is the code, if someone knows how to simplify it for me then please, i would be greatful or perhaps offer an alternative solution:
-- Create Table that will hold the values for the running total declare @MyTable TABLE (UID INT IDENTITY(1,1), CurrentMonth VARCHAR(20), GPYTDValue FLOAT, RunningValueGP FLOAT) INSERT INTO @MyTable (CurrentMonth, GPYTDValue)
SELECT dt.[month_name], (sum(ft.price)- sum(ft.cost)) as turnover2005 FROM dim_time dt, fact_transaction ft, dim_Client dc WHERE dt.time_key = ft.time_key AND dt.[year] IN (2005) AND dc.client_name like '%medicare%' GROUP BY dt.[year], dt.[Month], dt.[Month_Name] ORDER BY dt.[Year], dt.[month], dt.[month_name],sum(ft.cost)
UPDATE @MyTable SET RunningValueGP = GPYTDValue WHERE UID = 1
DECLARE @iStart INT DECLARE @iEnd INT
DECLARE @RunningTotalGP FLOAT
SELECT @iStart = MIN(UID) FROM @MyTable SELECT @iEnd = MAX(UID) FROM @MyTable
SELECT @RunningTotalGP = RunningValueGP FROM @MyTable WHERE UID = @iStart
SELECT @iStart = @iStart + 1
WHILE (@iStart <= @iEnd) BEGIN SELECT @RunningTotalGP = @RunningTotalGP + GPYTDValue FROM @MyTable WHERE UID = @iStart UPDATE @MyTable SET RunningValueGP = @RunningTotalGP WHERE UID = @iStart SELECT @iStart = @iStart + 1 END
SELECT * FROM @MyTable
Kind Regards
- 3
- Windows Communication Foundation ("Indigo") ChannelFactory.Close() vs ChannelFactory.BeginClose()
We're building a web application that is using an application server via WCF web services. The web server is placed in a temporary DMZ with its own rather slow broadband connection serving traffic from the internet, while the application server is to be placed in our ordinary network behind our ordinary firewall. In other words, connections between the two servers will go through the internet with all the trouble that may cause. In about a year or so we will establish a proper DMZ to obtain a more stable and fast connection.
We have chosen to use the generic ChannelFactory class in stead of building client proxies, as this seems to be a more maintainable approach in this case.
When debugging, we have noticed that the ChannelFactory.Close() sometimes takes a little time. Some bright head came up with the idea to use the async approach in stead, by calling ChannelFactory.BeginClose(null, null), which means we initiate a close and do not wait or handle the callback by provide a delegate.
This seems to work out fine in our small test environment. My question is whether this approach is at all advisable, or might cause problems in a production environment with much heavier load.
Thanx in advance for any advice on this!
:) Helge K
- 4
- 5
- Windows Communication Foundation ("Indigo") data contract issue
What is wrong with the following code. When i try to access Retrive() operation the application time outs and at times it get communication error while MyOperation1() and MyOperation2() are working fine. host and clients are on the same machine.
using System;
using System.ServiceModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
// A WCF service consists of a contract (defined below as IMyService, DataContract1),
// a class which implements that interface (see MyService),
// and configuration entries that specify behaviors associated with
// that implementation (see <system.serviceModel> in web.config)
[ ServiceContract()]
public interface IMyService
{
[ OperationContract]
string MyOperation1(string myValue1);
[ OperationContract]
string MyOperation2(DataContract1 dataContractValue);
[ OperationContract]
CommunicationWrapper Retrieve();
}
public class MyService : IMyService
{
public string MyOperation1(string myValue1)
{
return "Hello: " + myValue1;
}
public string MyOperation2(DataContract1 dataContractValue)
{
return "Hello: " + dataContractValue.FirstName;
}
public CommunicationWrapper Retrieve()
{
CommunicationWrapper wrapper = new CommunicationWrapper();
List<Object> objList = new List<object>();
string str;
try
{
DataContract1 dataContract = new DataContract1();
dataContract.FirstName = "Saeed";
dataContract.LastName = "Hassan";
objList.Add(dataContract);
wrapper.Bolist = objList;
} catch(Exception e)
{
str = "The method or operation is not implemented.";
}
return wrapper;
}
}
[ DataContract]
public abstract class BaseClass
{
private string primaryKey;
[ DataMember]
public string PrimaryKey
{
get { return primaryKey; }
set { primaryKey = value; }
}
}
[ DataContract]
public class DataContract1 : BaseClass
{
string firstName;
string lastName;
[ DataMember]
public string FirstName
{
get { return firstName;}
set { firstName = value;}
}
[ DataMember]
public string LastName
{
get { return lastName;}
set { lastName = value;}
}
}
[ DataContractAttribute]
public class CommunicationWrapper
{
private List<object> bolist;
[ DataMember]
public List<object> Bolist
{
get { return bolist; }
set { bolist = value; }
}
public List<object> GetBOList()
{
return Bolist;
}
public void SetBOList(List<object> value )
{
Bolist = value;
}
}
- 6
- Visual Studio Extensibility Code Generation Conference, May 2007, Cambridge, UK
The Code Generation Network is organizing a new conference themed around Code Generation tools and technologies to take place in Cambridge, UK from 18th May - 20th May 2007.
We're looking for session proposals from people who have experience applying DSLs, and can lead a session on this subject for a developer audience. Accepted session leaders will have their conference fees waived.
There's more information at the Code Generation 2007 web site. It's straightforward to submit a session proposal, but the submission deadline is Friday January 12th 2007.
Microsoft are sponsoring the event and I expect the DSL team to participate, so it will also be a great opportunity to talk about the tools with the experts.
- 7
- Windows Presentation Foundation (WPF) Emboss effect
Can anybody help me with EmbossBitmapEffect
After export XAML from GD some Paths with embossing convert to png, and emboss live many Paths.
"In XAML" I found EmbossBitmapEffect but can create cool emboosing :((
Can you give me some samples of EmbossBitmapEffect
Thx
- 8
- 9
- Visual Studio MSBuild How to tweak the OutputPath on a Visual Studio .NEt 2005 solutionHello.
I know that this kind of question has already lead to much writing on this forum. I've been digging, with no luck. I explain my need.
Context and requirements
I am compiling a MS Visual Studio .NET 2005 solution on the command line via a 'msbuild.exe' call. This solution contains several C# projects, with a dependancy graph.
By default, each project output path is set via the MSBuild 'OutputPath' property, defined with the value 'bin\$(ConfigurationName)', which imposes the output artifacts to be created related to the Visual Studio C# project location on the hard disk, in the directory 'bin\Release' related to the directory containing as a child the project, in release mode.
What I need, is to set this 'OutputPath' directory on another location, dependant on the Visual Studio C# project being compiled. Let's take an concrete example.
Example
If I have two C# projects in my solution named A.csproj and B.csproj with the following folder location:
- C:\TEST\APath\Solution.sln
- C:\TEST\APath1\A\A.csproj
- C:\TEST\APath2\B\B.csproj
I'd like the artifacts to be set in:
- C:\TEMP\AnotherPath\APath1\A\A\bin\$(ConfigurationName)
- C:\TEMP\AnotherPath\APath2\B\B\bin\$(ConfigurationName)
I'd like this to be applicable as an option, that is to say that I'd like both the default output paths to be applied if I want, and this specific output path to be applied when I need.
Constraints
- I want to discard MSBuild post-build event copy tasks, because the default location filesystem 'C:\TEST' is very slow, and this is exactly the reason why I want to change the artifcats output directory path.
- I need all the VS 2005 .NET C# projects post-build and pre-build targets to be able to keep on using the 'OutputPath' property with the overriden value.
Statement
Since MSBuild mechanism first evaluate the 'OutputPath' property, and that many properties (like the 'OutDir', 'BaseIntermediateOutputPath', 'TargetDir' properties) depend on its value, and that they are evaluated once for all before any target execution (which would enable to override the 'OutputPath' property), I cannot write a pre-build target that would override this property and be evaluated after the 'PropertyGroup' 'OutputPath' and before all the previously mentionned depending properties be evaluated.
If my requirements are not clear, I'm very ready to explain back another way. If someone is able to propose a solution, this would save my month! Thank you for your time and attention. I'm quite confident that MSBuild can achieve this ;->
Edouard
- 10
- Crystal Reports for Visual Studio Export data from crystal Report 8 to excelI am trying to Export the Crystal report data using RDC using CR 8.0. The report hold around 70 to 80 fields in it. here the data is transfer in rhandom format. i have atted the excel sheet for the eg. Is there any setting need to be done to set up data or any restictions are ther for no of fileds to export please help me.
- 11
- 12
- 13
- Windows Presentation Foundation (WPF) ElementHost = can’t use embeded resources !?
Hi,
I found that if you use an ElementHost on a Win form to host a xaml aplication you will not be able to use embeded resources.
This is because the only way that WPF embed's a resource on to an .exe or .dll is by defining a <resource/> on the "app.xaml" page.
So when you use an ElementHost that merely shows a simple WPF form with some images or whatever, the only way to access resources is by accessing them thru siteoforigin URI e.g "pack://siteoforigin:,,,/XamlResources". This means you have to create a folder on your aplication to store all your resources. In my case that's bad :(.
Anyone with the same problem
- 14
- Visual Studio Tools for Office VSTO 2005 SE Installaion issues
hi,
i'm having problems with the installation of the vsto. i run the vsto 2005 se installation package and the PIA install for office 2003 but when i try to run code samples i get the following error:
Error: The operation could not be completed. No such interface supported
this also happens when i try and build my soulution. am i doing something wrong or are there any known conflicts with vsto and other .net components
- 15
|
| Author |
Message |
Zia Khan

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
When I use the entities within a WCF muti-tier service, the performance is terrible. I am guessing that it is trying to search for the WCF transaction I have not specified any WCF transactions, and am using basic http binding.
The performance is so bad that the WCF service is timeouting even when i set the timeout to about 1 min. Has anyone out there used entities in a WCF service
Visual Studio 200819
|
| |
|
| |
 |
Kevin Hoffman

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
It depends on what you mean by using Entities within a WCF service. I would say that even if technically possible, you should never attempt to return a "live" entity as a return value from a WCF service (or a Remoting call or any other cross-AppDomain bridge).
What I have done in the past is use completely serializable structs that I return from WCF calls where the WCF service itself invokes the entity framework, does its query, gets an entity or list of entities, then turns it into something that is marshallable by value, not reference.
I think what we should see here is some way to take a "live" entity and disconnect it from the underlying model so that there are no traps for property change events and no attempt at remote identity management, etc - that would enable you to pass disconnected entities around across AppDomain barriers. I don't know if entity classes have some functionality like this built-in that I'm not aware of
In short, every attempt I have made to use entities in cross-AppDomain scenarios has caused me nothing but trouble and I have had to do some small workarounds to leave the entities within a single AppDomain and use lighter-weight constructs to transmit results out.
|
| |
|
| |
 |
Zia Khan

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
You are right, I am not attempting to return an entity. It is not possible because in WCF Services we can only pass or return object by value not by remote reference.
I am doing what u are saying, but when I use entities in a service the performance takes a hit, I just want to know if others are also seeing this behaviour and what is the work around
|
| |
|
| |
 |
Daniel Simmons - MSFT

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
We're actively working on some incremental changes to the entity framework to facilitate these kinds of scenarios. There's no way we're going to get as far in Orcas as we would like, but we are definitely making some progress both to add capabilities to the framework (like attaching a graph of entities to the context directly into an unmodified state rather than just supporting add, including some serialization attributes to make things a bit quicker/easier to serialize with WCF, etc.) and to explore (and eventually document) some effective patterns for creating web services using entities.
This is definitely part of our goals for Orcas (just not quite all complete yet).
|
| |
|
| |
 |
Kamran_ku

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
I think what we should
see here is some way to take a "live" entity and disconnect it from the
underlying model so that there are no traps for property change events
and no attempt at remote identity management, etc - that would enable
you to pass disconnected entities around across AppDomain barriers. I
don't know if entity classes have some functionality like this built-in
that I'm not aware of
|
| |
|
| |
 |
Daniel Simmons - MSFT

|
Posted: ADO.NET (Pre-release), Performance when using with WCF |
Top |
For a single entitiy this is relatively easy to do: find the CacheEntry for the entity (renamed to StateEntry in more recent versions which may or may not be in the build you are working with), call Delete on it, and then call AcceptChanges. This will cause it to be removed from the cache but that change to be marked as accepted so that a later call to SaveChanges won't try to delete the entry from the database.
That said, I'm not sure the scenario where you are concerned about the need to unhook the entity from change tracking and things like that. In most of the scenarios I've looked at, once the entity is remoted the object on the other side is going to be unhooked already (because it's a copy reconstituted from what ever remoting format). Could you give me more info about the scenario you are having trouble with
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio 2008 ‹ ADO.NET (Pre-release) |
- Next
- 1
- 2
- Windows Presentation Foundation (WPF) GeometryModel3D Question
I have a program that parses a .obj file from Maya and creates a <GeometryModel3D> xaml representation of it.
Is there some way from the code behind that I can insert this xaml into the xaml for the page i.e. Insert it into an empty <GeometryModel3D> element in Window1.xaml from Window1.xaml.cs on the page load.
- 3
- 4
- Visual Studio Report Controls ReportViewer with multiple TableAdapters.
I cannot get a Form with a report that has two TableAdapters to show data for both parts of the report. I have one report that needs to two table adapters. The first will be used for a chart, and the second for a table with quite different data. I do have both TableAdapters listed in the Reports | Data Sources. The chart's properties has one adapter chosen and the table the other adapter. The Form the report is on calls both Fills, but both seem to point to the one datasource (DataTable1BindingSource.DataSource). If I change assign a different DataSource then only on or the other shows data, either the chart or the table. Perhaps I need a second BindingSource (DataTable2BindingSource.DataSource) also Any thoughts on how this might be accomplished or if it cannot be done would be greatly appreciated (I've been banging my head for three days!).
Regards,
Glenn
- 5
- Visual Studio Tools for Office MODI Example
Hi everyone,
I'm new at vb .net, and i'm wondering if someone has an example that
uses the MODI (Microsoft Office Document imaging) control in VB .NET
I found an example for VB6, but upgrading it to .Net doesn't seem to work.
Thanks,
Guy
- 6
- Crystal Reports for Visual Studio Printing questions, crystal view PrintReport method
I am using Visual Studio .net 2003 to create a web application for a set of crystal reports. I am trying to print the whole report, rather than just the current page. I have another thread going on this forum to try and help me figure out why PrintToPrinter doesn't work the way I want it to, but in my research I have discovered that there is supposed to be a PrintReport method in the CrystalReportViewer control. However, I can't see it. The articles I read seem to say that I should have that functionality in 2003...are they wrong And if so, why is it so difficult in 2003 to print a crystal report in it's entirety, or choose a subset of pages Isn't that the whole point
Please help...I hate to have a whole application held up by something like this.
Geoff Callaghan
- 7
- Visual Studio Tools for Office Word: Add picture (VSTO2005)
Hi,
I would
like to display a picture in the Word document which I download from a remote
server. So fare, there is no problem. I can just download the picture, store it
on the client machine and display it with the following command:
range.InlineShapes.AddPicture("C:/picture.gif",ref missing, ref saveWithDocument,
ref missing);
Question: Is it possible to add a picture to the document without having to
save the downloaded picture
I tried this… but it didn’t work of course:
range.InlineShapes.AddPicture("http://www.mysite.com/picture.gif",ref missing, ref saveWithDocument,
ref missing);
Thanks, Claudia
- 8
- Visual Studio Extensibility Integration was removed by VS 2005 now I can't get it back?I recieved a message from VS2005 about an integration I was using FTN95 v 5.0 (a FORTRAN compiler) being corrupt and that it would remove it the integrations from the environment. Since then I have completely uninstalled said compiler and integrations and reinstalled, and I cannot fully get them back. By this I mean that, while I can add an FTN95 project to my solutions, I cannot add a source file or such to one of my FTN95 projects, which tends to make it slightly difficult to develop a project. Any thoughts about how to get this back I really need them.
- 9
- Visual Studio Extensibility Problem in OAProject.Properties
Hi
I'm using the MPF with my specific VS projects but I got an error while acessing their properties (i'm using September SDK). In the OAProject property,
public virtual EnvDTE.Properties Properties
{
get
{
object outputProperties = null;
IVsExtensibility3 vsExtensibility3 = this.project.GetService(typeof(IVsExtensibility)) as IVsExtensibility3;
vsExtensibility3.GetProperties( this, this.project.NodeProperties, out outputProperties);
return (EnvDTE.Properties)outputProperties;
}
}
I always get an error 'Attempted to read or write protected memory' in the GetProperties call.
However, if I change the code to an implementation similar to OAProjectItem
...
if (this.project.NodeProperties == null)
{
return null;
}
return new OAProperties(this.project.NodeProperties);
it seems to work fine... What is the problem and the need for the former implementation
thanks
- 10
- Visual Studio Tools for Office Which VSTO edition should I be using?
Earlier I downloaded the "Microsoft Visual Studio Tools for the Microsoft Office System" and now I see there's a "Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System" download that is available.
I had to remove everything because I was experiencing problems when trying to run in debug mode (The ApplicationStartUp event was not firing, but that's another story). Now I get the following error which occurred after I remove the first VSTO install and then installed the latest.
"The Visual Studio Environment Menu Package ({715F10EB-9E99-11D2-BFC2-00C04F990235}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt."
- 11
- Windows Presentation Foundation (WPF) how to convert binary of a 3D xaml resource, to make the program light weigh
Hi,
I have a really complex 3d object with me, and is of around 3000 lines of xaml....when i program wityh this objet in ide, it just fails to load, / makes the IDE slow.
Now, the thing is i could have kept it as a resource but still the resource file would m,easure around 8 mb in size....
can we make this whole thing really light by converting the whole 3d xaml piece in to some binay format like .bin (they use somewhat like this in Computer games likes NFS).
thanks and regards
brij
- 12
- Windows Presentation Foundation (WPF) How do I change the layout of an ItemsControlI know a way to change the layout of the ItemsControl using ControlTemplate from the post
"How do I change the layout of an ItemsControl"
The post introduce tow way to achieve it:
1 <ListBox ItemsSource="{Binding Source={StaticResource xmlData}}" (...) > <ListBox.ItemsPanel> <StackPanel Orientation="Horizontal" /> </ListBox.ItemsPanel> </ListBox>
2
<ControlTemplate x:Key="listBoxTemplate"> <Border BorderBrush="Orange" BorderThickness="2" Margin="10,0,10,10"> <StackPanel Orientation="Horizontal" IsItemsHost="True" /> </Border> </ControlTemplate>
But first sample only run on CTP version.
And i want to know how to do it in version 3.0
could anyone help me thanks
- 13
- Windows Presentation Foundation (WPF) How to reverse item flow?I have an ItemsControl with items shown horizontally inside a StackPanel. How can I change the direction of the items in that StackPanel, so that one time items 0...n go from left to right, another time from right to left (nothing to do with FlowDirection for text). And how could I bind that to a property at runtime
- 14
- Visual Studio Setup and Installation Visual Studio SP1 for Vista Beta
Hi,
I have Visual Studio Team Edition for Developers installed on a Vista machine. When I tried to apply the Vista Beta version of SP1 it told me that the patch could not be applied because the required product was not installed. Does SP1 beta not work for any of the team editions
Thanks
- 15
|
|
|