w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

Connecting to WCF service in Windows Phone 8 (C#) by using domain credentials
I don't have any phone development experience. Where is what I do at a C# Service Level. Uri uri = new Uri("http://whatever.com"); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); NetworkCredential networkCredentials = new NetworkCredential(); networkCredentials.Domain = "Domain"; networkCredentials.UserName = "User"; networkCredentials.Password = "Pass"; CredentialCache cc = new CredentialCache(); cc.Add(uri, "Basic", networkCredentials); //NTLM can be used here, but Basic usually works. request.Credentials = cc; request.Method = WebRequestMethods.Http.Get; using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { ... }

Categories : C#

WinRT - Windows Store - WinRT Originate Error - How do decipher such an error?
As Raman said - it's good to look up the hex values shown. The first one is the memory location which won't tell you much without the symbols/source, which in this case is reported directly by Windows. Perhaps the public symbols can shed some more light on where the error came from, but the error code lookups are more helpful. If you Bing for 0x80070057 you will find an MSDN article on Common HRESULT Values which lists E_INVALIDARG : One or more arguments are not valid : 0x80070057 It doesn't give you all the details of course, so you're off to theorize. Perhaps you can only call args->GetCurrentPoint(nullptr) once and you should store/reuse the value? Maybe gesture recognizer is not configured correctly? Maybe the app window is not visible at the time the exception is thrown or t

Categories : Visual C++

WinRT FlipView like control in WP8
There is no direct equivalent to the FlipView in Windows Phone. The Panorama and Pivot controls have very different functionalities and are designed fro different purposes. Telerik have a SlideView control which is very similar to the native control used by the photos app. You can also get the Telerik controls free as part of the Nokia Premium Developer Program. (Worth investigating if you don't have a Dev Center subscription.)

Categories : Windows Phone 8

How to Encrypt string in WinRT app, decrypt in WCF service?
If you want to prevent eavesdropping on the communication between your app and the service, I would suggest you to just use SSL/TLS (https) as it was designed to do exactly that. If for some reason you really want/need to encrpt a string before sending it across the wire, asymetric encryption (RSA) would be your best choice. You can look at this SO answer for details on that, including the export/import of the key.

Categories : C#

Exposing commands for MVVM user control inside GridView in WinRT
There are two methods for doing this. first one that you can use is - bind your button to a command that is defined- in your parent viewmodel where you can do your work. second one is - you can use mvvm messenger class. in which you have to send message from your button click eventhandler to your viewmodel. when you received this message add some eventhandler to it and perform your work there.

Categories : Xaml

Identity and Access Manager not displaying "Use the Windows Azure Access Control Service" on Existing Project
Did you created any identity provider? Please check the following article to get more detail : http://blog.tomasjansson.com/configuring-windows-azure-active-directory-access-control

Categories : C#

C# Mixing WinRT and Windows Forms
WinRT UI components can only be used in windows store apps and Windows Forms only in desktop apps so you will not be able to mixed both. If you are looking into making a desktop app for windows 8, maybe you should look into using WPF. If you are looking into making a windows store app, there is plenty of third party control libraries which have a TreeView including the WinRT xaml toolkit .

Categories : C#

How to use OutputDebugString from Windows 8 C++ / WinRT Component
You will need to add: #include <..umdebugapi.h> Sample call: App::App() { InitializeComponent(); Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending); OutputDebugString(L"App initialized "); }

Categories : C++

CLR, Win32, WinRT in Windows architecture
WinRT is primarily a set of APIs to build Metro apps for all Metro-supported platforms (including for Windows 8 for ARM). The Windows Runtime provides a large set of new APIs to Windows Experience developers. From http://arstechnica.com/features/2012/10/windows-8-and-winrt-everything-old-is-new-again/5/: The WinRT name stands for "Windows Runtime." However, this isn't a runtime in the same way that Microsoft's .NET Runtime was a runtime, or the way Oracle's Java Runtime Environment is a runtime. In the .NET and Java cases, the runtime is a relatively large software component that provides a virtual machine environment, garbage-collected memory, various kinds of code safety verification, and more. The .NET and Java runtimes are intimately involved in virtually everything a

Categories : Dotnet

C# Windows 8 Store (Metro, WinRT) Byte array to BitmapImage
This is working for me, private async Task<BitmapImage> ByteArrayToBitmapImage(byte[] byteArray) { var bitmapImage = new BitmapImage(); var stream = new InMemoryRandomAccessStream(); await stream.WriteAsync(byteArray.AsBuffer()); stream.Seek(0); bitmapImage.SetSource(stream); return bitmapImage; }

Categories : C#

Detect multiple keyboard press in windows store app/winRT
Well of course it doesn't work, since e is an instance of KeyEventArgs and it thus only represents one key. I think, however, that the KeyDown event is called for every key that is pressed, even if simultaneously. So, what you need to do is the following: Create an IEnumerable of Keys, which may be a List for example Create a bool indicating if at least one key is down, which you can control via the KeyX events. If you need help on that please comment. On the KeyDown event, add e.key to that list, and clear it when your value is set to false You now have a list containing every key that is currently being held, and you can use it to check multiple keypresses. If you need a code example, I'll add it.

Categories : C#

Winsock -> WinRT Windows.Networking.Sockets -- mapping error codes
The WinRT C++/CX socket calls that would block are all asynchronous, so they do not immediately return a result code. When things go wrong, the async task will throw an exception, and the exception will be marshalled to the task that waits for it. Assuming you are using Microsoft's task library (ppltasks.h), the code to connect a socket to a remote interface would look something like this: StreamSocket^ socket = ref new StreamSocket(); // Assume portStr and hostName are defined elsewhere String ^portStr; HostName^ hostName; task<void>(_connectSocket->ConnectAsync(hostName, portStr)).then([this] (task<void> previousTask) { try { previousTask.get(); } catch (Exception^ exception) { // If ConnectAsync gets an error, this is where you can

Categories : C++

What guarantees does the service control manager (SCM) make about the method calls on the service?
Michael Taylor provided a good answer to this question on the MSDN forums referencing the Win32 API which documents what the SCM will do in response to invalid control codes (reject them in various ways). State change methods are called only when the SCM believes the service is in the appropriate state and assuming that the service says it can handle the state (pause/continue). OnStart will be called if the service is stopped. OnPause is called if the service is running. OnContinue if the service is paused. A paused service can only be resumed or stopped. A running service can only be paused or stopped. SCM serializes commands to a service so only a single command will be running at a time. Refer to the Win32 documentation on how services work fo

Categories : C#

Connecting Nav Web Service in php
I am dealing with the exact same problem, but have not found a solution because they all come back to this same script. Your problem is that you are getting no result back because of a 401 error code (could not authenticate), which is exactly I where I am stuck as well. The script ends up using CURL to connect, but somehow that fails.

Categories : PHP

Connecting to a Raspberry PI that is connected to a router that I don't control
Here is a post that explains how to connect to Pi in any network. Pay particular attention to the section IP Address lookup by Hostname http://carbonstone.blogspot.com/2013/08/setting-up-truly-portable-raspberry-pi.html Basically you use the ping command to lookup the Pi by it's hostname. If you want to do it programatically, you can parse the ping response to extract the IP address.

Categories : Linux

Connecting to web-service without metadata
What you should do is download the WSDL file on to your machine and use the svcutil.exe tool to generate code directly from the WSDL. See This Question for an example of how this is done. I believe what you are doing is called WSDL-First development. A more detailed link on that is here.

Categories : C#

How can I guarantee that I am connecting to my service and not someone else?
Unfortunately there is no way to stop Tom from getting the password. Ultimately if Tom knows what he's doing, he can get the password in one way or another. Some possibilities include performing a memory dump while the key is in memory, and reverse engineering the binary to save it out somewhere as you mentioned. The "correct" way to do this is to have Tom send the file to either the admin or the Main Service, and have the service return the unencrypted contents. The bottom line is that if you send Tom the key, no matter what you do to your client you can't stop Tom from recovering the key if he is sufficiently savvy with RE techniques.

Categories : Wcf

Are Windows-GUI calls (creating visible windows, etc.) allowed in a Windows-Service?
GUI elements from a Windows Service are shown on Session 0. On Windows XP & 2003, users were allowed to log in to Session 0 and interact normally with the windows created by a service, but Microsoft put a knife in the heart of interactive services in Vista (and beyond) by isolating Session 0. So, to answer your specific questions: Is a process running in the context of a Service (the Service itself or any process it starts) "allowed" to make Windows API calls that display a visible GUI? Will most Windows API calls (e.g. creating and showing a window, using Shell_NotifyIcon, etc.) behave the same in the invisible session of the service? Yes, GUI calls are allowed and should succeed as normal. The only notable exceptions that I know of are those related to tray icons b

Categories : Windows

Windows Service Communicate with another Windows Service, Locally
The .NET framework has some higher level abstractions that might be easier to use and already include some security mechanisms. Maybe check out: NetPeerTcpBinding: http://msdn.microsoft.com/en-us/library/system.servicemodel.netpeertcpbinding(v=vs.90).aspx

Categories : C#

Getting an error connecting web service using SOAPUI
Try disabling the proxy in SOAP-UI, which indicated in the attached screen shot. Or Give a valid proxy connection under Proxy settings in SOAP UI Global preference. By disabling the proxy preference SOAP UI may work in offline. Hope it might solve your issue. Thanks, Madhan

Categories : Web Services

connecting android to .net web service database
You have to implement KvmSerializable.You can see ksoap2-android,CodingTipsAndTricks for more details. that is a very good tutorial.

Categories : Android

Null Notifications When Connecting To a Web Service
You're never filling your public static field Values in the first place, so Values.get("name") will return null, and thus toString() is called on a null variable. You attempt to create different variables named Values (or values) in your code, but you never assign anything (other than an empty new object) to the Values field, nor do you directly call any setter methods on the Values field.

Categories : Java

Problems connecting with Dbpedia Lookup web service
I talked to the author of the code and he corrected some minor bugs. Here is the code: Here is the link to the corrected code: https://github.com/mark-watson/java_practical_semantic_web/blob/master/src/com/knowledgebooks/info_spiders/DBpediaLookupClient.java Thats a really good example of the use of the Dbpedia Lookup Service with Jena. It works perfectly!

Categories : Java

Connecting to a Web Service using Client Certificate authentication
It appears that the server did not understand TLS. I had to specify SSLv3, via System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3;

Categories : C#

Get user appdata path from windows service by running service under local profile
I have also encountered in that problem and looked at your question but i at first sight didnot find an answer in it. This is the Mohit shah Answer "I found out that is not possible to get user appdata path from windows service by running service under profile "LocalSystem". So I used Environment.SpecialFolder.CommomAppData which gives me app data path C:ProgramData when run on windows 7 and when used same thing in windows service, it also gived the same path and i also ran the service under profile "LocalSystem" so it did not prompt me for credentials. So this solved my problem." @Mohit Shah Please mark this is as answer so that other can take help from that.

Categories : C#

Connecting Windows Phone 8 to Sql server
Well, to achieve your goal, I would do: Build a REST webservice with ASP.NET Web API (http://www.asp.net/web-api) which returns objects (those objects will be translated to json automatically). For example: public class MyObject { public string Content { get; set; } } Controller for it: public class TestController : ApiController { [HttpGet] public MyObject Example() { return new MyObject() { Content = "Hello World!" }; } } Use a HTTP client in your win phone project: HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://mywebservice.com"); client.DefaultRequest.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); using (var result = await client.GetStreamAsync("test/example")) { var serializer = new JsonSerializer(); //

Categories : C#

Connecting to smtp server windows C++
In the following line: sock = socket(AF_INET, SOCK_STREAM, 0); You do not specify a protocol. You should change it to sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); This is the kind of protocol you are going to want to establish with something such as a mailing service.

Categories : C++

Connecting iOS app to Windows/Linux apps
Without any details of the application or frameworks its hard to be more than vague and point you in the right direction. If you have already explored Bonjour/Zeroconf to connect the iPhone to the server, I'd keep looking down that path. The first place to look is PyBonjour for how to broadcast the server from Python. Although there are a few issues in how to configure this on Windows vs. Mac vs. Linux, this will be slight. For example, for windows the user will need to install Bonjour for Windows, where as Linux users will need Avahi, but most of this can be setup durin install. Secondly, look at the Bonjour documentation for iOS, which will be much easier as its all built into the system and APIs. From here both server and client are discoverable to each other. The last issue is deter

Categories : Python

Connecting to SQL Server using windows authentication
A connection string for SQL Server should look more like: "Server= localhost; Database= employeedetails; Integrated Security=True;" If you have a named instance of SQL Server, you'll need to add that as well, e.g., "Server=localhostsqlexpress"

Categories : C#

I need a Windows 8 WinRT application to communicate with a standalone application written in C
Well, the posts stating that such communication is not possible, are mostly right. There are 2 reasons, why this is prevented: Being able to communicate to an application outside the sandbox effectively breaks the sandbox. The Windows Store app is now suddenly able to do everything the desktop application can do: access file system, registry... Windows Store apps live in a sandbox for reason - to be safe for the user. The Windows Store app won't work after it is installed from the the store or from a package. It needs to have a desktop application installed and set up correctly as well. I would suggest you try to move your server part to a different machine and make it a proper server. If for some reason you really can't do that, you still have the following options available: You ca

Categories : C++

Testing Windows DOTNET Service on Linux using mono-service
If you have installed mono using sudo apt-get install mono-complete, you might want to look at the mscorlib. Mono take mscorlib.dll 2.0 instead of 4.0 Unable to run .net app with Mono - mscorlib.dll not found (version mismatch?) might be of use.

Categories : C#

Hosting WCF Service in a Windows Service - and start some stuff at the beginning
Whether this is viable in your circumstance or not will depend on your service design but the two general approaches I would consider for exposing service A to B with the overall design you've presented: pass a reference to the main service instance to the WCF / monitoring service in the constructor if using something like Castle Windsor, register your main service as a singleton so the monitoring service can access the main service instance from various points It's fine It's not necessary at all, but depending on the nature of the main service it might make sense to expose the monitoring functionality in a consistent manner with the primary functionality.

Categories : C#

SFTP: how to know if i'm connecting to a unix or windows host?
There is a number of possible ways to complete your task, however I'm not sure if your libraries support them: SFTP protocol contains SSH_FXF_TEXT_MODE file open flag, allowing to open file in text mode, translating EOL sequences to CRLF (available since version 6 of protocol, AFAIR). 'newline' SFTP extension - it tells exact server's EOL convention Parsing SSH server software/version string.

Categories : Java

Windows Azure: FTP issue When Connecting to Website
The error message: Response: 550 The network connection was aborted by the local system Suggests that there is an error in your local network. This error is not within Windows Azure, but within your local network (and appears to only be triggered by FileZilla). Contact your system administrator or Internet Service Provider. Also, please try first solving the problem yourself using something like this.

Categories : Azure

Windows service calling WCF service (web http configuration)
In you WCF Service configuration you forgot to add the behaviour configuration(you named it "WebHttp") to the endpoint try this : <endpoint address="" binding="webHttpBinding" bindingConfiguration="basicWebHttp" contract="Classes.IVisService" name="BasicHttpBinding_IVisService" behaviorConfiguration="WebHttp" />

Categories : C#

Call Method In Windows Service from WCF Service (Self Hosted)
If the window service is to host WCF service, that is all what it should do (SRP). However, WCF can interact with another Project (say Business service that Process your business rules). So what I am saying is Windows service only host wcf, wcf service delegates the request to the Business service for processing

Categories : C#

Windows service uses external libraries, do I need to somehow register those with the service?
I am so glad you got it working. I know i have seen many have this problem.... And to think my own question about it got down voted. But anyways these are called Loader Service(by Microsoft) not Windows Service. They are the same thing except the former has the ability to interact with GUI. I know its a couple of months later this answer but...Your problem is not the library... its the process itself. Use this Thread, I was able to create my own solution for this problem since many had the problem but noone gave the solution to it directly. My Solution - C# Windows Service Creates Process but doesn't executes it

Categories : C#

System.Windows.Controls.WebBrowser, System.Windows.Threading.Dispatcher, and a windows service
Maybe the Webbrowser Control needs Desktop Interaction for rendering the content: My feeling say that using WPF controls and in particular particulary the Webbrowser-Control (=Wrapper around the IE ActiveX control) isn't the best idea.. There are other rendering engines that might be better suited for this task: Use chrome as browser in C#?

Categories : Wpf

connecting to mac localhost via windows computer sharing the same network
Providing that you edited the hosts file in Windowssystem32driversetchosts, it should normally work most of the time. If it doesn't, the only thing I can think off is that it it sometimes necessary to reset and clear the cache in Windows 7. You can have a look at Windows 7 refresh DNS for guidance. There is a step by step post here.

Categories : Apache



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.