|
|
Those are good reads as I was not familiar with that but unfortunately to use those would require a lot of code re-writing. I am confident that this latency is not from AJAX. I have run tracing in fiddler, dynaTrace, and IE and in all cases the tools report a responsive site in all ways other that this strange random latency in the pre-request state. I really need to simply identify what is going on during the browser start\wait period on the random page requests that experience latency. However it seems that there is no information about anyone having a similar situation anywhere on the web.
|
|
|
|
|
Hi,
I have WCF ServiceA and WCF ServiceB. ServiceA is calling ServiceB. Both of them are using BasicHttp binding. But I am getting the exception with message as below. When I am trying to call the ServiceA and ServiceB individually from a test page both of them are working fine.
But I want to call ServiceB from ServiceA. I am not using the ServiceReference to call the serviceB I am calling the Service in the following way
Code to create the Service proxy
Imports System.ServiceModel
Imports System.ServiceModel.Web
Imports System.ServiceModel.Description
Public Class ServiceFactory(Of T)
Public Shared Function GetBasicHttpChannelForService(ByVal source As String) As ChannelFactory(Of T)
Dim factory As ChannelFactory
Dim result = String.Empty
Try
'Get the channel from WCF
Dim address As EndpointAddress = New EndpointAddress(source)
Dim binding As BasicHttpBinding = New BasicHttpBinding()
binding.MaxReceivedMessageSize = 2147483647
binding.ReaderQuotas.MaxArrayLength = 2147483647
binding.MaxBufferPoolSize = 2147483647
binding.CloseTimeout = New System.TimeSpan(1, 1, 1)
binding.OpenTimeout = New System.TimeSpan(1, 1, 1)
binding.ReceiveTimeout = New System.TimeSpan(1, 1, 1)
binding.SendTimeout = New System.TimeSpan(1, 1, 1)
If factory Is Nothing Then
factory = New ChannelFactory(Of T)(binding, address)
ElseIf factory.State = CommunicationState.Closed Then
factory = New ChannelFactory(Of T)(binding, address)
ElseIf factory.State = CommunicationState.Faulted Then
factory.Close()
factory = New ChannelFactory(Of T)(binding, address)
ElseIf Not factory.State = CommunicationState.Opened Then
factory.Close()
factory = New ChannelFactory(Of T)(binding, address)
End If
Catch ex As Exception
End Try
Return factory
End Function
Public Shared Sub CloseChannelFactory(ByRef factory As ChannelFactory)
If Not factory Is Nothing Then
If factory.State <> CommunicationState.Closed Then
factory.Close()
End If
factory = Nothing
End If
End Sub
End Class
And in the test page's load even I am creating the Service proxy in the following way
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim factory As ChannelFactory(Of IStayAtWorkService)
'GetMessages(New Guid("b14bc077-f1df-457c-9f7e-7cb9e0bc1cf3"))
'Dim factory As ChannelFactory(Of IStayAtWorkService)
Try
factory = ServiceFactory(Of IStayAtWorkService).GetBasicHttpChannelForService _
(ConfigurationManager.AppSettings("StayAtWorkServiceAddress"))
Dim sawService As IStayAtWorkService = factory.CreateChannel()
Dim inputFileBytes() As Byte
Dim inputFile As String = ConfigurationManager.AppSettings("InputFiles")
Using fstream = New FileStream(inputFile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Using br As BinaryReader = New BinaryReader(fstream)
inputFileBytes = br.ReadBytes(fstream.Length)
br.Close()
End Using
fstream.Close()
End Using
Dim fUpload As New RequestFile()
fUpload.FileName = inputFile
fUpload.FromDiv = "Accordian1"
fUpload.ImageBytes = inputFileBytes
fUpload.RequestId = 2
Dim d = sawService.SaveRequestFile(fUpload)
GridView1.DataSource = d
GridView1.DataBind()
Catch ex As Exception
Finally
ServiceFactory(Of IStayAtWorkService).CloseChannelFactory(factory)
End Try
End Sub
Where am I missing, doesnt WCF support calling one service from another service or is it because I am creating service client for serviceB by using runtime mechanism. Please give me some solution. I would be really really thankful. When I am able to call individually why am I not able to call one service from another service. Please help me in fixing it. Following is the error message I am getting.
The remote server returned an unexpected respo
nse: (400) Bad Request.
And Stack TRace is :
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ValidateRequestReplyResponse(HttpWebRequest request, HttpWebResponse response, HttpChannelFactory factory, WebException responseException, ChannelBinding channelBinding)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at WA.LNI.StayatWork.Service.IStayAtWorkService.SaveRequestFile(RequestFile fUpload)
at WA.LNI.StayatWork.Public.UI.WebServiceTestPage.Page_Load(Object sender, EventArgs e) in D:\source\SourceCode\StayatWork-VS2010\WA.LNI.StayatWork.Public.UI\WebServiceTestPage.aspx.vb:line 157
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
I have a C# 2010 web application that is having problems displaying a few items from the master pages. Thus I need to be able to determine what the issue. Due to that fact, I have the following questions:
1. F12 Developer Tools look like they can be used to analyze what a problem is. Can you tell me where I can obtain a copy of the F12 Developer Tools? Are the part of Visual Studio.net 2010 professional edition? If so, can you tell me what part of the install I would obtain the F12 developer tool from?
2. If the F12 Developer Tools are not part of visual studio, can you tell me where I can download the tool from?
3. Do you have directions I can follow on how to use this tool?
|
|
|
|
|
I'm confused.
You have the source code to the web application. Right?
Why can't you use VS2010 to debug the application?
|
|
|
|
|
I am having problems with the master page markup. It is not displaying correctlty. I am hoping you can tell me how to see where there are problems with master pages that contain html and css pages.
|
|
|
|
|
I am binding MSChart to a dataset filled with 2 or more datatables. The MsChart is showing only the last datatable. My code is pasted below:
-------------------------------------------------------
Private Sub ProductionChart()
'use collection to collect Selected product
'
Dim Col As New Collection
For Each lst As ListItem In chkWStringList.Items
If lst.Selected Then
Col.Add(lst.Text, lst.Text)
End If
Next
oDs = New DataSet
oDs = oTier.Production3(Col, Date.Parse(Date1.Text), Date.Parse(Date2.Text))
With Chart1
'Create new chart area for original series
Dim ca As ChartArea = .ChartAreas.Add("ca2")
.Titles(0).Text = "Chart"
.Titles(0).Font = New Font("Trebuchet", 14, FontStyle.Bold)
.ChartAreas("ca2").AxisX.TitleFont = New Font("Verdana", 10, FontStyle.Bold)
.ChartAreas("ca2").AxisX.Title = "Date"
.ChartAreas("ca2").AxisY.Title = "Production"
'.Series.Clear()
For j As Integer = 1 To Col.Count
Dim oSeries As Series = New Series(Col.Item(j))
.Series.Add(oSeries)
'Give names to Series
oSeries.Name = Col.Item(j).ToString
.DataSource = oDs.Tables(j - 1)
oSeries.ChartArea = ca.Name
oSeries.ChartType = SeriesChartType.Line
oSeries.XValueMember = "Date"
oSeries.XValueType = Charting.ChartValueType.Date
oSeries.YValueMembers = "Production"
oSeries.BorderWidth = 3
Next
.DataBind()
.Visible = True
End With
End Sub
|
|
|
|
|
aransiola wrote: For j As Integer = 1 To Col.Count
aransiola wrote: .DataSource = oDs.Tables(j - 1)
You get the last datatable as you have written code for that. You have started a for loop and keep changing the datasource depending on the index 'j'. Finally, when the loop comes to an end, 'j-1' has the last table pointed as a reference to datasource leading to data display of last table.
|
|
|
|
|
i am using the loop to add data source for each series i want the chart to show.
|
|
|
|
|
How to export selected items to excel sheet in grid view and save that excel sheet in folder
|
|
|
|
|
|
|
|
Hi iam tarun.......
I need an application for Time slot boooking for room.....plz send me apps to my mail id or send the url to my mail id tarun00197@gmial.com
Thanks in advance
|
|
|
|
|
You do realise that Code Project is not a location where people come to hand out their code for free don't you? If you need a fully written application, and you can't find a suitable one in the articles, then you will have to either write it yourself, or hire someone through Rentacoder.
|
|
|
|
|
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.
Try them and tell if you face issues.
Members will be more than happy to help like this.
|
|
|
|
|
Hope you have seen the Post saying "How to Get answer to your question" in this forum. Please go through it and post any specific issue you are facing.
Thanks & Regards,
Vani Kulkarni
|
|
|
|
|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
how to retrieve value of dataset coloumn in c#
I tried b/m but not working
lblreturncode.Text=ds.Tables[0].Columns["item"].ToString();
|
|
|
|
|
try using table mapping name..instead of index (table[0])
|
|
|
|
|
Hi,
Could anyone tell me how to remove session timeout feature from asp.net website.
The session of the user need to be closed only when he/she clicks on logout or close the application or else the webpage has to be in alive state till the time.
Increasing the sessiontimeout in <sessionstate> is also not solving the problem.
Could you tell me how to do it, if possible Could you share a link with example.
|
|
|
|
|
You should not implement such feature in the interest of your web server performance. If you keep sessions alive for long period then it would affect your website performance.
If you really need to have long session times, then increase the timeout to a decent level. Set high value in Web.Config as well in IIS settings. AppPool recycle time too will need a tweak.
|
|
|
|
|
I have a copy of the production version of a C#2010 web form application. When I am running the application, I am missing part of what is displayed on the second layer of the web page. The logon page looks fine. However when I go to the second web page, I am missing part of the header. I have the top level header, but I am misisng the second level header.
Can you tell me determine what I am missing? Should I be looking for the missing connections in the web config file? What do you recommend I look for?
|
|
|
|
|
Sounds like more of missing resource files like background images.
Has that been master page missing, I doubt your app would have run without errors.
|
|
|
|
|
How do I check for missing resource files?
|
|
|
|