Wireless barcode scanner - wireless

I have 2 wireless barcode scanners. I have created an application in C# which reads a barcode and sends data to a web service which then manipulates the data and do further processing. When I start aplication, it first tries to connect to web service and will proceed further only if connection succeded. The problem I am facing is, if I deploy the application through visual studio then it works fine and connects to web service. But if I just copy the contents (exe and config files) manually, then it gives error that unknown host name. Can someone please help me to understand how this connection works? Does it needs some special settings in scanner device which visual studio does automatically while deployment?
Thanks and Cheers.

Related

Connect web app to Visual Studio Application Insights

I'm using Application Insights as part of my .Net Framework WebAPI project. When running the code locally (in debug mode), I can see all the events that would be sent to AI locally in Visual Studio by clicking the Application Insights button in the toolbar.
I've also got a Angular web App which works in tandem with the .Net backend. I've got the web version of Application Insights setup on it which sends telemetry to an Azure AI instance. Is it possible to have the Angular web app send its telemetry to the local AI instance in Visual Studio when I'm running it locally?
I'm using v2.5.10 of the #microsoft/applicationinsights-web library and Visual Studio Professional 2019 if that makes a difference.
Actually, there is no local AI instance. By default, the data you see in visual studio -> Application Insights Search window is from the current debug session, the screenshot is as below:
Another thing is that if you specify a valid InstrumentationKey, the data are always sending to application insights in azure portal(unless you setup firewall rule to block them).
For Angular web App, there is no way to just show the data in visual studio, but not sending to AI instance in azure.
Here are some suggestions just for your reference, but they cannot totally meet your requirement:
Solution 1: Sending data from Angular web App to AI instance in azure, then you can fetch these data from azure to visual studio locally. To do that, in the visual studio -> Application Insights Search window, change the Debug session telemetry to the AI instance in azure. Like below:
Solution 2: If you just don't want to send the data to Azure, you can use an invalid InstrumentationKey, and then open tools like fiddler to see these telemetry data.

Problems debugging web role remote on Microsoft Azure

I am trying to debug a webservice remote on Microsoft Azure. The service is running in a web role.
I have configured remote debugging in the publish settings an can attach the debugger to the web role. Also, when I have selected the correct process, the debug symbols are loaded correctly and breakpoint's tool tips say that the breakpoint is hosted in "WallSHost.exe" which is the remote process.
What I would like to do, is to run a local client software which I am developing and step into the server code from there. When I step into the according service client call (F11), I get the above error message, saying (for the sake of Google in plain text here):
Unable to automatically step into server. Connecting to the server
machine 'xyz.cloudapp.net' failed. The Microsoft Visual Studio Remote
Debugging Monitor (MSVSMON.EXE) does not appear to be running on the
remote computer. This may be because a firewall is preventing
communication to the remote computer.
I have tried to disable the firewall on my (the client) machine with no effect. Has anybody seen that before or can tell me how fix this problem?
A quick checklist
deployed cloud service is a debug build
a debug build is selected from Build Configuration list (in publish wizard)
'Enable Remote Debugger For All Roles' is checked
no changes to code since deployment

remote debugging in visual studio cannot connect

Hello i have a problem with remote debugging in Visual Studio (v12)
I Created windows azure account i published application to the cloud.
Then i connected to this account through remote desktop. Address of remote computer is f.e Iron.app.net
Then i downloaded there and run remote debugger. I started msvsmon.exe and it created server named:
RD0015555E2:555
And now i would like to remote debugging in my host.
i know i must attach to process. And i do it.
From Visual Studio: Debug->attach to process->Qualifier:RD0015555E2 and it cannot resolve host name.
i also tried Iron.app.net but then it shows error that it seems that msvsmon is not installed.
I dont know what should i type into Qualifier (as remote machine)?
Remote debugging is tricky to configure Windows Azure Cloud Services. Other options that you have are:
Intellitrace (in case you've got Visual Studio Ultimate)
Intensive (verbose) pro-active code instrumentation (logging) from the beginning.
Profiling Cloud Service
Chose either, and watch your logs/traces.
Or deep dive into Remote Debugging Cloud Services. I would, however use Remote Debugging as a final option, when everything else does not work and does not help me. Typically most of the issues that would pop in the cloud will also pop in when debugging locally. And if role is just recycling, you will not be able to attach debugger at all.

Visual Studio is setting up my Azure web role to 127.255.0.0:82 instead of 127.0.0.1:80

I have Windows Azure SDK 1.6 installed along with Azure tools. I have one web role (with two endpoints, port 80 for http and port 443 for https) and only have one instance of the web role running (for testing purposes).
When I ran it from Visual Studio for debugging last week, it ran the emulator, attached it to IIS with a binding of 127.0.0.1:80 and everything was peachy.
But as of yesterday, as soon as I started it was trying to bind it to 127.255.0.1:82 and it stopped working with this error (from Visual Studio):
There was an error attaching the debugger to the iis worker process
for URL 'http://127.255.0.0:82'
Now if I manually go to IIS and change the bindings back, I can access the site through a browser but obviously I can't debug it via VS.
Why is Visual Studio doing this? What made it change from last week (I've only made code changes and I have commented them out)?
Edit: I know about this blog, but my issue seems to be different because for one reason I don't have errors in the event logs. And like I mentioned as soon as I change the bindings manually in IIS, I can access the site properly so the app pool is configured correctly.
Edit2: I have the following set:
<compilation debug="true" targetFramework="4.0" />
And my cloud project is set to startup project as well.
When I ran it from Visual Studio for debugging last week, it ran the
emulator, attached it to IIS with a binding of 127.0.0.1:80 and
everything was peachy.
I don't believe you ever debugged a Azure Emulator deployed project on 127.0.0.1:80 binding with IIS. There is a chance that what you've debugged is just the Web Application project and not the Azure Deployed one. Let me explain why:
Windows Azure Emulator uses internal emulated Load Balancer (LB).
This emulated LB binds to 127.0.0.1 port 80 (if port 80 is already
taken it uses port 81)
Windows Azure Tools are dynamically creating a virtual IP address
for every instance of a webrole you have. These dynamic IP Addresses
are 127.255.0.X, where X is the logical number of the instance (0,
1, 2, etc...).
Windows Azure tools creates a website in the local IIS, with binding
of 127.255.0.X and port 82
Step 3 is repeated for every instance you have defined.
When start debugging, your browser usually opens http: //127.0.0.1:81/ which is the address of the LB. But the request from this address is forwarded to the IIS and its binding to 127.255.0.X:82. You could not have debugged a Windows Azure Emulator deployed project by manually attaching debugger to 127.0.0.1:80, because, if everything was fine there is no w3wp process listening on that address:port, but Azure emulated LB.
When you only have the WebRole (no additional sites defined), Windows Azure Tools does know that it shall attach the debugger to 127.255.0.X:82 where a w3wp process is listening.
This is the clean working configuration of Azure Emulator & SDK & Tools v.1.6 (I think also 1.5 and even back to 1.3 where the Full IIS mode was introduced for first time)
Now if I manually go to IIS and change the bindings back, I can access
the site through a browser but obviously I can't debug it via VS.
Yes, you will be able to access the site, but in that way you are skipping the emulated LB, which is not the point when developing Windows Azure Applications.
If you are heving issues of that kind, I suggest that you clean your solution, restart the computer, and if the problem persist uninstall the SDK & Tools and perform clean full install of SDK & Authoring tols for Windows Azure v.1.6 using the Web Platform Installer.

Windows 7 - Enable Network DTC Access

I have a Visual Studio 2010 Windows Forms application in which I start a transaction using the TransactionScope class. I then Receive a message from a Sql Server Broker Services message queue, which works fine. I next try to call a stored procedure from the same database with a call to my data access layer which is a Visual Studio dataset (xsd file). When I make this second call to the database I get the following error message:
The MSDTC transaction manager was unable to pull the transaction from the source transaction manager due to communication problems. Possible causes are: a firewall is present and it doesn't have an exception for the MSDTC process, the two machines cannot find each other by their NetBIOS names, or the support for network transactions is not enabled for one of the two transaction managers. (Exception from HRESULT: 0x8004D02B).
I've seen several posts on the web that talk about Enabling DTC access through dcomcnfg.exe, and allowing DTC to communicate through Windows Firewall. I've done those things, and am still having this problem. I know our remote database server is setup to Enable DTC access, because we are using similar transactions in other projects built with Visual Studio 2008 on Windows XP and Vista. I think there is something specific about Windows 7 and Visual Studio 2010 causing this problem, but haven't been able to find out what it is. Can anyone help with this problem?
I just saw a post on the web from another programmer having this problem (http://www.pcreview.co.uk/forums/thread-3977150.php), he says it works fine on Windows 7 - x86, but gets this error on Windows 7 - x64. I'm running the x64 version of Windows 7, does anyone know if there are problems with MSDTC on Windows 7 - 64 bit version?
It turned out that I was leaving a database connection open in my Receive call to the SQL Server Service Broker, then trying to make a new connection to my data access layer. That was causing the problem, the fix turned out to be to close the first connection before opening the second one.

Resources