|
CrazyCoder26 wrote: I checked the buffersize,maxReceivedMessageSize,receiveTimeout,closeTimeout,
openTimeout,sendTimeout
Increase sendTimeout to a bigger value and try again.
|
|
|
|
|
<pre>
<binding name="BasicHttpBinding_IOMSService" closeTimeout="00:50:00"
openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</pre>
maxbufferSize,maxReceiveSize is set to the maximum integer value.
senTimeout,receiveTimeout are given.....do I really need to increase them??plz look at the values for them....
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
Try by increasing the sendTimeout. See here.
|
|
|
|
|
Increased the sendTimout to 10:20:00....but still getting error
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
It seems Mr.Abhinav has given up my Issue!!!!
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
CrazyCoder26 wrote: It seems Mr.Abhinav has given up my Issue!!!!
Try enabling gzip compression on the service.
If that does not work, I give up!
And I hope you increased the maxbuffer size in your config file.
modified on Monday, April 26, 2010 7:26 AM
|
|
|
|
|
I checked the WCF with Fiddler...for large resultsets it also throws an exception saying "the connection closed unexpectedly".
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
Hi,
I need to style dataGrid rows for different background colors for alternate rows, different backgroundColor for hover and on selection I want to show a details template and on selection I also want a dotted blue border on the DataRow.
To achieve this, I create two different dataGrid styles, one for Datagrid where no row is selected and one for datagrid where a row is selected.
To apply styles I am handling SelectionChanged event of Datagrid. I am posting my code to get better idea.
<code>
<Window x:Class="Locations"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dg="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolKit"
xmlns:Primitives="clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit"
xmlns:Linq="clr-namespace:Linq"
Style="{StaticResource ExtWindow}" Icon="/Icons/building.png" >
<Window.Resources>
<Style x:Key="DatagridRowStyleRowDetails" TargetType="dg:DataGridRow">
<Setter Property="Background" Value="#DFE8F6" />
<Setter Property="BorderBrush" Value="{StaticResource CheckeredBlues}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="DetailsVisibility" Value="Visible" />
<Setter Property="DetailsTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type Linq:Address}">
<StackPanel>
<Label Content="Address:" />
<StackPanel Margin="0,0,0,10">
<WrapPanel Margin="0,0,0,-10" >
<Label Content="{Binding Path=HouseNumber}" />
<Label Content="{Binding Path=Street}" />
<Label Content="{Binding Path=IdentifierType}" />
<Label Content="{Binding Path=IdentifierValue}" />
</WrapPanel>
<WrapPanel Margin="0,0,0,-10">
<Label Content="{Binding Path=City}"/>
<Label Content="{Binding Path=State}" />
<Label Name="lblZip" Style="{StaticResource fieldLabelStyle}" Content="{Binding Path=Zip}" />
</WrapPanel>
</StackPanel>
</StackPanel>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DatagridRowStyleLocal" TargetType="dg:DataGridRow">
<Setter Property="Background" Value="#FFFFFF" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Width" Value="{Binding RelativeSource=
{RelativeSource FindAncestor,
AncestorType={x:Type dg:DataGrid}},
Path=ActualWidth}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type dg:DataGridRow}">
<Border Name="OuterBorder" SnapsToDevicePixels="True" BorderThickness="0, 1, 0, 0" BorderBrush="#FFFFFF" Background="{TemplateBinding Background}">
<Border Name="InnerBorder" SnapsToDevicePixels="True" BorderThickness="1, 0, 1, 1" BorderBrush="#EDEDED" Background="{TemplateBinding Background}">
<Primitives:DataGridCellsPresenter ItemsPanel="{TemplateBinding ItemsPanel}" />
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#FAFAFA" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="#EFEFEF" />
<Setter TargetName="OuterBorder" Property="BorderBrush" Value="#DDDDDD" />
<Setter TargetName="OuterBorder" Property="BorderThickness" Value="1" />
<Setter TargetName="InnerBorder" Property="BorderThickness" Value="0" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<DockPanel Width="500" >
<StackPanel>
<dg:DataGrid Style="{StaticResource DatagridStyle}" RowStyle="{StaticResource DatagridRowStyleLocal}" SelectionChanged="dataGridAddress_SelectionChanged" >
<dg:DataGrid.Columns>
<dg:DataGridTextColumn Binding="{Binding Path=Location.LocationSerialNumber}" Header="Location" />
<dg:DataGridTextColumn Binding="{Binding Path=HouseNumber}" Header="No." />
<dg:DataGridTextColumn Binding="{Binding Path=Street}" Header="Street" />
<dg:DataGridTextColumn Binding="{Binding Path =City}" Header="City" />
<dg:DataGridTextColumn Binding="{Binding Path=State}" Header="State" />
<dg:DataGridTextColumn Binding="{Binding Path=Location.TotalObjects}" Header="Objects" />
<dg:DataGridTextColumn Binding="{Binding Path=Location.TotalServices}" Header="Services" />
<dg:DataGridTextColumn Width="60" Header="Time" />
<dg:DataGridTemplateColumn Header="Completed" IsReadOnly="True" >
<dg:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button IsEnabled="{Binding Path=IsCompleted}" Style="{StaticResource imageButtonStyle}" />
</DataTemplate>
</dg:DataGridTemplateColumn.CellTemplate>
</dg:DataGridTemplateColumn>
</dg:DataGrid.Columns>
</dg:DataGrid>
</StackPanel>
</DockPanel>
</Window>
</code>
in code behind Selechanged event:-
<code>
private void dataGridAddress_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
object selectedItem = e.AddedItems[0];
DataGridRow selectedRow = dataGridAddress.ItemContainerGenerator.ContainerFromItem(selectedItem) as DataGridRow;
selectedRow.Style = this.Resources["DatagridRowStyleRowDetails"] as Style;
foreach (var item in dataGridAddress.Items)
{
if (item != e.AddedItems[0])
{
var dataGridRow = dataGridAddress.ItemContainerGenerator.ContainerFromItem(item) as DataGridRow;
dataGridRow.Style = this.Resources["DatagridRowStyleLocal"] as Style;
}
}
}
</code>
Styles are working ok as per requirement but if rows are selected rapidly then application crashes and throws exception
"The specified Visual is not an ancestor of this Visual."
Any idea how to fix this. I googled and found out that it is a bug, any one knows any workaround.
Thanks for reading,
Veena
|
|
|
|
|
Hi Experts,
I have created a user control in windows application and used it in wpf.
The user control is in a seperate project and solution than that of wpf.
I have exposed some properties in the user control and tried to use it in a wpf form.
I have used it in the WindowsFormsHost element and also added WindowsFormsIntegration reference.
I am facing the following problems:
1. I am able to see the user control in the toolbox but it is disabled.
2. I am able to design the user control in xaml and give values to properties. I am also getting the properties in intellisense but the same is not getting reflected/applied during design as well as run time.
3. I am not able to see the control in the properties window even after selecting it. I am just able to see WindowsFormsHost in the property window.
I am not able to find any sample project or explanation of this in code project. If there is any then please do let me know.
Also I am able to use this user control in a windows application very easily and it is working fine. Am i missing anything for wpf?
I can give the source code if required but i dont think it will be of much help as i have not done anything fancy.
Please help!
Thanks in Advance!
Regards,
Samar
modified on Thursday, April 22, 2010 8:49 AM
|
|
|
|
|
Hi Experts,
Any ideas on the above mentioned??
Regards,
Samar
|
|
|
|
|
i need to extract search results link from a google page...plz help me..i grab the html content of the page but cannot grab the search links...
|
|
|
|
|
Use a regular expression to pull out the <a> tags. BTW - I'm curious. How is this related to this forum?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi, I am new to Silverlight.I have created a simple silverlight application which uses a WCF dataservice to fetch some data from database.The WCF service is inside the application itself.The application runs fine in my development environment.But when I host the application in IIS,whenever the application tries to communicate with the WCF dataservice, it throws some error saying,"Unhandled error in silverlight application,An Exception occured during the operation,making the result invalid.Check inner exception details at System.ComponentModel.AsyncCompletedEventArgs.RaiseExecptionIfNecessary at
SQLData.ServiceReference1.GetCustomerByTerrytoryEventArgs.get_Result() at
...................................
The System.ServiceModel configuration is web.config is given below :
<pre>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="SQLData.Web.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="SQLData.Web.Service1Behavior" name="SQLData.Web.Service1">
<endpoint address="" binding="basicHttpBinding" contract="SQLData.Web.IService1">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
</system.serviceModel>
</pre>
I am totally confused....I searched the web...and applied everything they said....but still getting this error......Please help me solve this issue.
<font style="color:Green;font-family:Courier New;font-weight:bold;">C</font><font style="color:Blue;font-family:Courier New;font-weight:bold;">C</font><font style="color:Pink;font-family:Courier New;font-weight:bold;">26</font>
|
|
|
|
|
|
Thanks for posting the solution.
You could however format it using PRE tags to make it more readable.
|
|
|
|
|
I've several WPF Control-Library type projects in a solution. Build provides DLLs for each project.
How can I combine these user-controls into a single DLL? And, show a particular control based on XAML specification when used in a project? What should be approach to do this?
May be in XAML, to display controls, we just need to write something like this
<Window xmlns:CombinedControl="SomeThing">
<Grid x:Name="LayoutRoot">
<CombinedControl:Control1/>
<CombinedControl:Control2/>
<CombinedControl:Control3/>
<CombinedControl:Control4/>
</Grid>
|
|
|
|
|
Alright - I've only found two way for accessing a sql database from a silverlight app:
- Using RIA Services
- Using a web service
Is it possible to do this without using either of those two methods? We're on a DOD network, and getting permission to deploy stuff like web services or even ria services is a frakking nightmare, and we'd like to avoid it if we can.
Can I just create a regular .Net assembly with the ADO stuff in it and use that? (see EDIT #2
EDIT #1 ==============
If there is no other way, I've gotten to the point where I have a domain service created, but I haven't been able to determine how to actually use it. I don't want to bind to a control. I simply want to get at the data, and every example I've found on the net assumes I want to bind to a frakking control.
EDIT #2 ==============
Well, you CAN'T add a non-silverlight assembly reference, and since you have to use a Silverlight assembly, you of course can't use System.Data.SqlClient . I don't think it could get any less convenient.
.45 ACP - because shooting twice is just silly----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Wednesday, April 21, 2010 9:36 AM
|
|
|
|
|
My experience with silverlight in a browser
is , it has all the network capabilities of the
browser its in. So of course it's only going
to make requests on port 80. So basically if
you cannot connect with browser to you sqlserver
then silverlight wont either. Your best bet
is a web service . But maybe
move on up to the Cloud with Azure.
|
|
|
|
|
Azure is completely off the table. No way, no how, will we use Azure.
I've already started writing a web service.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
A third way is to use the Entity framework directly, although RIA services could be considered as a subset of that (or vice versa).
|
|
|
|
|
There is no way you'll get this working. Even if you run Silverlight 4 in Elevated trust, the only thing you'll get is access to the clients file system.
Of course you could build a HTTP-REST based service that just accepted full SQL Queries from the client, and return the resultset, but the the security can of worms that you'd be opening then are horrendous. This is not just SQL injection, this is open doors on your database. I doubt the DoD would be happy.
No, RIA services it should be (and,no you can't get at the data), except through a web service.
|
|
|
|
|
|
Once I convert a WPF control into UserControl, Some of its Common Properties get disappeared. How can I retain properties like 'Content', 'GroupName' for a RadioButton control after conversion?
|
|
|
|
|
After you convert something into a user control, it is now embedded within that user control. You have to create properties to interact with the control you have just converted into a user control.
|
|
|
|
|
Hi,
i have a gridview and in style of celltemplate i define tooltip equals to whatever content that cell have. So it will display blank tooltip while content equals to null.
So what to do for not displaying tooltip if data is not available in cell?
Any tricks in datatrigger??
Solved :
Done by writing following code :
<DataTrigger Value="{x:Null}" Binding="{Binding Content, RelativeSource={RelativeSource Self}}">
<Setter Value="false" Property="ToolTipService.IsEnabled"/>
</DataTrigger>
modified on Tuesday, April 20, 2010 6:53 AM
|
|
|
|