Deploying report shows an error - c#

I'm using SSRS 2008 R2 for my reports.
I have been working in my local environment and there was no problem with deploying to the local server. Now I want to deploy all the reports to live server but when I try to deploy to the live server by changing the Target server url and then providing the user name and password. its showing the error. (I'm deploying from VS 2008)
===================================
Could not connect to the report server http://192.168.0.217/ReportServer. Verify that the TargetServerURL is valid and that you have the correct permissions to connect to the report server. (Microsoft SQL Server Report Designer)
===================================
The underlying connection was closed: An unexpected error occurred on a receive. (System.Web.Services)
------------------------------
Program Location:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.SqlServer.ReportingServices2006.ReportServiceAuthentication.GetAuthenticationMode()
at ReportServiceClient2010.CheckAuthenticated()
at Microsoft.ReportDesigner.Project.ReportClientManager.DetectEndpointAndAuthenticate(String url, ICredentials credentials, String& authCookieName, Cookie& authCookie, EndpointType& endpointType)
at Microsoft.ReportDesigner.Project.ReportClientManager.DetectEndpointAndAuthenticate(String url, ConnectionProperties& connectionProperties)
at Microsoft.ReportDesigner.Project.ReportClientManager.GetCredentials(String url, CancelFlag cancelFlag)
at Microsoft.ReportDesigner.Project.ReportProjectDeployer.PrepareDeploy()
===================================
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System)
------------------------------
Program Location:
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
===================================
An existing connection was forcibly closed by the remote host (System)
------------------------------
Program Location:
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
But Im able to browse the report server from my local machine by providing the credentials. Anyone knowsa solution for this?

Try this , should help mostly. Also try and see if you are able to upload reports one by one using the Upload facility on the SSRS server itself
http://www.sqlservercentral.com/Forums/Topic1135602-150-1.aspx#bm1135709

Related

Web client throwing exception "Unable to read data from the transport connection:"

Background:
We have a common service to download a file to specific location. This service uses WebClient to download a file. This service is used by multiple applications.
.Net Framenwork: 4.5.2
Enabled TLS version on Prod, UAT: TLs1.3, TLS1.2
Issue:
Sometimes We are receiving an exception mentioned below on Prod server only not QA, UAT.
An exception occurred during a WebClient request.
InnerException :
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
--- End of inner exception stack trace ---
at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult)
at System.Net.WebClient.DownloadBitsReadCallbackState(DownloadBitsState state, IAsyncResult result)
Query: When looked for this type of issue almost every page on internet is saying it TLS issue, just add a line mention below in code. And few pages are saying don't hardcode the TLS version.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
I also believe we should not hardcode the tls version.
But I am not getting what is the actual root cause of this issue?
why this issue is intermittent and why this persist on only Prod?
Code:
WebClient wc = new WebClient();
await wc.DownloadFileTaskAsync(new Uri(webendpoint), sharedPath);
return 0;

Xamarin Android Visual Studio layout not rendering when creating new blank app

I try to create new project using xamarin android blank app. When I try to open the main.axml layout, it give below error:
System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at Xamarin.AndroidDesigner.Java.JavaCommunicationContext.ReadMessageLoop() in C:\d\lanes\4699\1be4f0c9\source\xamarinvs\External\md-addins\MonoDevelop.MonoDroid\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Java\JavaCommunicationContext.cs:line 227
Same problem for me when I open the layout. It supposed to be a version problem of xamarin (check this post :
Unable to render xamarin android layout
I ckeck that version, it's the 4.5.0.476, the same as the post above.
I'll try to downgrade this version, I'll keep you informed

TCP WCF Client as windows service connects only under administrator user privilege

I have been writing windows services for over a decade but this is my first with WCF TCP.
Problem:
In a client-server WCF TCP scenario (separate computers), server part works perfect. The client code also works perfect as console app, but when running the same code inside a windows service, it works only under Administrator user. Using Network Service or Local Service (as required for such usages) ends with the following error:
The socket connection was aborted. This could be caused by an error
processing your message or a receive timeout being exceeded by the remote
host, or an underlying network resource issue. Local socket timeout was
'00:00:59.8938785'.
An existing connection was forcibly closed by the remote host System
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size,
SocketFlags socketFlags)
at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32
offset, Int32 size, Boolean immediate, TimeSpan timeout)
System
at System.Net.Security.NegotiateStream.ProcessWrite(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Write(Byte[] buffer, Int32 offset,
Int32 count)
at System.ServiceModel.Channels.StreamConnection.Write(Byte[] buffer, Int32
offset, Int32 size, Boolean immediate, TimeSpan timeout)
To simplify the situation, I wrote a WCF server as windows service which utilizes a simple [OperationContract] method which gets a string and echoes it back, so code is not a big deal. Also, this has nothing with timeout settings on server or client, but client user accounts.
Client part (console app and win service, under different users) tested on Windows 10 Pro and Windows Server 2003 with the same results. Server part resides on a Windows Server 2003. All in .Net 4.
Question:
A windows service under Administrator user is not an option, so how can I force WCF TCP client on windows service working under Local Service / Network Service?
Update
WCF tracing report in rar format
Update 2
Sample Project
Regards

C# WatiN Firefox - Unable to read data from the transport connection

I'm trying to launch a web bot developed with WatiN (via Firefox).
It launches and works perfectly on my computer (even without launching it as admin), however when I launch it from my VPS (where I'm not admin), Firefox and my application immediatly crash.
The console shows (I translated it from french) :
Unhandled exception: System.IO.IOException: Unable to read data from the transport connection: an existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: an existing connection was forcibly closed by the remote host.
to System.Net.Sockets.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
to System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
to System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
to WatiN.Core.Native.Mozilla.FireFoxClientPort.ReadResponse(Boolean resultExpected, Boolean checkForErrors)
to WatiN.Core.Native.Mozilla.FireFoxClientPort.WaitForConnectionEstablished()
to WatiN.Core.Native.Mozilla.FireFoxClientPort.Connect(String url, Boolean createNewFirefoxInstance)
to WatiN.Core.Native.Mozilla.FireFoxClientPort.Connect(String url)
to WatiN.Core.Native.Mozilla.CreateFireFoxInstance(String url)
to MyTranslationAutomation.MyTranslation..ctor(MyConsole& console)
to Program.Actions.Main()
Console:
Finally it worked when I install a new version of the FireFox's JSSH plugin, found with SWAT: http://sourceforge.net/projects/ulti-swat/files/

Problems FTPing FROM Azure to another FTP site

I've tried using FtpWebRequest and EnterpriseDT.Net.Ftp on an Azure website where I want to pass a byte array from a FileUpload to another FTP site.
This works on local servers and hence will work on a VM but cannot get it working on an Azure website. Admittedly we're trying to avoid the costs of adding a VM or an additional Azure storage account.
It seems the port is blocked on Azure, yet it is open to us on local servers.
[IOException: Failed to connect to XXX.XXX.XXX.XXX:21 within timeout 120000 ms]
EnterpriseDT.Net.StandardSocket.InternalConnect(EndPoint remoteEP, Int32 timeout) +272
EnterpriseDT.Net.StandardSocket.Connect(EndPoint remoteEP, Int32 timeout) +350
EnterpriseDT.Net.Ftp.FTPControlSocket.ConnectSocket(BaseSocket socket, String address, Int32 port) +66
EnterpriseDT.Net.Ftp.FTPControlSocket.Initialize(BaseSocket sock, String remoteHost, Int32 controlPort, Int32 timeout, Encoding encoding) +57
EnterpriseDT.Net.Ftp.FTPClient.Connect(String remoteHost, Int32 controlPort, Int32 timeout) +407
EnterpriseDT.Net.Ftp.FTPClient.Connect() +43
EnterpriseDT.Net.Ftp.FTPConnection.Connect() +456
XXXXX.XXXXX.XXX.XXXXX.FtpUpload(String Id, FileUpload file, String ftpServer, String ftpUsername, String ftpPass, String domainName) +371
Does anyone know how this can be accomplished via .net FtpWebRequest or a third party library?
The FTP port (21) is blocked for an Azure website directly, if you use: ftp://{sitename}.azurewebsites.net, to get the proper FTP profile for that website you need to download it's publishing settings, there you'll find the address, user name and password.
Information on getting the publish profile is here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/06/26/deploying-windows-azure-website-using-visual-studio-web-publish-wizard.aspx
I would also recommend you use the VFS endpoint of your scm site (https://{sitename}.scm.azurewebsites.net) to upload files, this way you use https protocol which is more reliable.
The VFS api:
https://github.com/projectkudu/kudu/wiki/REST-API#vfs
More about your scm site:
http://blogs.msdn.com/b/windowsazure/archive/2014/03/04/windows-azure-websites-online-tools-you-should-know-about.aspx

Categories