Menu
  • HOME
  • TAGS

Using Sync Framework in Visual Studio 2013

Tag: wcf,visual-studio-2013,microsoft-sync-framework,sql-server-2012-localdb

Does anyone have a walkthrough or video on how to use Sync Framework in VS 2013? I've seen nice examples using VS 2010 but some important items like local database cache object have been deprecated.

For what I have read is that LocalDB will be replacing the Sql Compact (which is deprecated). But have not found a site explaining how things should work. My solution for what I understand would be a LocalDB syncing with a SQL Server with IIS using WCF. Any pointers would be appreciated.

Best How To :

there's no equivalent for the Local Database Cache project wizard in VS 2013. if you want to do what the wizard does, you can hand code it yourself. but that will be using the older sync providers.

you can find a walkthrough of how to achieve this with the newer sync providers here. The SqlSyncProvider should work with SQL Server/Express/LocalDB/Azure. You can also still SQL CE if you want to.

How to install Xamarin for Visual Studio 2015 when Visual Studio 2013 is installed too?

visual-studio-2013,xamarin,visual-studio-2015

I think the link below may assist you: first, uninstall everything related to xamarin. second, open vs2015 and create new andriod project third, when project is created you'll see instructions to downloading xamarin. Download the xamarin installer for vs2015, install it, after installation - open vs2015 and see the newly...

How to get previous version using git and VS Express for web 2013?

git,visual-studio-2013

You can get a specific version via git checkout [commit_id]. You can undo that commit with git revert [commit_id].

Visual Studio 2013 Report RDLC with related datasets

visual-studio-2013,report,relational-database,rdlc

To group data in a report: Click the Design tab. If you do not see the Row Groups pane , right-click the design surface and click view and then click Grouping. From the Report Data pane, drag the Date field to the Row Groups pane. Place it above the row...

Change mapping option replaced with cloak option in TFS

visual-studio-2013,tfs

I recommend installing "TFS Source Control Explorer Extension" - From below link: https://visualstudiogallery.msdn.microsoft.com/af70cbb7-1e0d-4d16-bc57-cccc15370c51...

How to stop visual studio generate typescript js and js.map files while publishing

visual-studio-2013,configuration,typescript,publishing

However while publishing my project, it still generates js and js.map file foreach .ts files. You probably have different config for debug and release. Make them the same....

How to make a programs icon in the task bar change based on something like time? [duplicate]

c#,.net,vb.net,visual-studio-2013

You could to this at start (take Title out of the XAML) this.Title = DateTime.Now.ToString(); But a dynamic ticking clock in the task bar would not be easy ...

Visual Studio Ctrl + F search freezes when including a '(' character

visual-studio,visual-studio-2013

Do you have regular expression searches on? ( is a meta-character for regexes and, on its own, is an invalid regex. Visual Studio is waiting for enough input for a valid regex to search with....

Method declared with dynamic input parameter and object as return type in fact returns dynamic

c#,.net,dynamic,visual-studio-2013

The problem is that you're calling a method with a dynamic argument. That means it's bound dynamically, and the return type is deemed to be dynamic. All you need to do is not do that: object dObj = "123"; var obj = Convert(dObj); Then the Convert call will be statically...

OData Endpoint with .NET

c#,asp.net,visual-studio-2013,odata,web-api

Check your assembly bindings in the web.config. You might need something like this (or you might have to remove one). Ensure that any bindings are pointing to the assemblies existing in your bin folder. <dependentAssembly> <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> </dependentAssembly> Also, Update NuGet packages to...

Can't reinstall package

visual-studio-2013,nuget

NuGet will skip reinstallation of a NuGet package if it cannot find it in the currently selected package source since the reinstall would fail leaving the NuGet package uninstalled. So it is worth checking what the currently selected package source in the Package Manager Console is since it may be...

Visual Studio 2013 C# compile with /main

c#,visual-studio-2013

You obviously want to write a ConsoleApplication. You picked WpfApplication. Copy your whole code, create a new project based on ConsoleApplication and paste your code there. And try to get rid of the gotos, it's not BASIC. You could easily make a single function for all your three uses....

devenv.exe hogs CPU when debugging

asp.net-mvc,visual-studio-2013

I didn't manage to find the source of the problem, but closing all editor windows in VS seems to make it go away. If there are further lag spikes, restarting debugging might be also a good idea. Since I didn't see this problem in a new project, it might be...

Cannot add new shared dataset to report

visual-studio-2013,reporting-services,sql-server-2008-r2,ssrs-2008-r2

The most likely reason for this error is that your stored procedure returns a table which has duplicated field names. Just double check that all the field names are unique, and it should work....

Visual Studios building and debugging .cpp file without main()

c++,assembly,visual-studio-2013

Your code does have a main function, which is required for it to work. As you said the debugger returned a 'missing executable' error, I'm assuming you didn't compile the code, or if so, got some errors which can be found in the output and error windows. If you're working...

HTTP Error 403.14

asp.net-mvc,visual-studio-2013

Stilly! There is a refactor bug in VS that changes the routes as well! My default route was changed to the following and I had to rename name to id and everything is working fine! routes.MapRoute( name: "Default", url: "{controller}/{action}/{name}", defaults: new { controller = "Home", action = "Index", id...

The remote server returned an unexpected response: (413) Request Entity Too Large.?

c#,web-services,wcf

Try this, <bindings> <basicHttpBinding> <binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"> <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </basicHttpBinding> </bindings> Instead of these lines in your code, <bindings> <basicHttpBinding> <binding name="SampleBinding"...

Not able to create a WCF RestFul Service's client

asp.net,web-services,wcf,rest

I found the answer myself. In my service I had not declared an endpoint for met data exchange due to which when I was trying to add the reference of the service to the client the required app.config was not being generated. Adding the end point for metadata exchange solved...

Redirect Visual Studio to new TFS Location

visual-studio-2013,tfs

You have to connect to the new TFS from Team, Connect to Team Foundation Server menu.

Using/abusing a conditional breakpoint to manipulate a value

.net,visual-studio-2013,visual-studio-debugging

My question seems to be related: Why does the debugger's breakpoint condition allow an assignment-statement as bool-condition? It seems that this bug(in my opinion the debugger should not allow side effects from a breakpoint condition) was fixed in VS2013. You have to change the setting if you want that side-effect:...

How do I install the Wix extension on after a Visual Studio 2013 Update?

visual-studio-2013,wix

I in the end wasn't able to find a way to resolve this without uninstalling and installing WIX. Repair didn't resolve this issue. I had to uninstall and install WIX again to resolve this....

The Address property on ChannelFactory.Endpoint was null. The ChannelFactory's Endpoint must have a valid Address specified

c#,asp.net,wcf

Try using the overload of DuplexChannelFactory(InstanceContext, Binding, EndpointAddress) that takes the binding and endpoint, so the factory will have the required components. Updated code: var binding = new WSDualHttpBinding(); var endpoint = new EndpointAddress("http://192.168.2.131:8089/"); InstanceContext context = new InstanceContext(new Form1()); var cFactory = new DuplexChannelFactory<IPubSubService>(context, binding, endpoint); This will assign...

Error cross domain call using WCF Rest

javascript,c#,jquery,ajax,wcf

In your service contract you might want to put an optional WebGet directive. [WebGet(UriTemplate = "GetData/{value}")] string GetData(int value); Another thing to look for is that you have a json behavior defined for your enpoint in the web.config. <endpointBehaviors> <behavior name="jsonBehavior"> <webHttp defaultOutgoingResponseFormat="Json"/> </behavior> <behavior name="xmlBehavior"> <webHttp defaultOutgoingResponseFormat="Xml"/> </behavior> </endpointBehaviors>...

Using Try/Catch block to set file path?

visual-studio,visual-studio-2013

Your inner Try/Catch block should be inside the FileNotFoundException catch. Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim sr As IO.StreamReader Dim age As Integer Dim path As String Try sr = IO.File.OpenText("Ages.txt") age = CInt(sr.ReadLine) txtOutput.Text = "Age is " & age Catch exc As IO.FileNotFoundException...

When I type static, Visual Studio replaces it with ContextStaticAttribute [closed]

c#,visual-studio-2013

I just figured out how you did this by typing static inside a method. Variables in a method cannot be static, only class level elements can. Simply declare those variables inside the class, not a method. Example: namespace ConsoleApplication2 { class Program { static string username; // Correct private static...

Creating a 25fps slow motion video from a 100fps GoPro .mp4 video with C++/OpenCV

c++,opencv,video,visual-studio-2013,slowmotion

As I suspected, it's the Coded! I used many of them, but then I found this question: Create Video from images using VideoCapture (OpenCV) then I used the coded MJPG in: outputVideo.open(name, CV_FOURCC('M', 'J', 'P', 'G'), 25, size, true); // create a new videoFile with 25fps and it worked! Here's...

Visual Studio Assembly force-installs Target Framework

c#,.net,visual-studio-2013,.net-framework-version

The targeted .NET version is the only version that the app will depend upon by default. Visual Studio will not automatically add higher and backwards compatible releases. Do this manually by adding other .NET versions to a configuration file: On the Visual Studio menu bar: Choose Project; Add New Item;...

VS2013 Is Not Compatible With VS2015 Project Type

asp.net-mvc,visual-studio-2013,asp.net-mvc-6

This repo is a fork of next version of ASP.NET MVC. It's built to run on VS 2015, C#6 and the next runtime. Even if you could open it, you couldn't compile or run it. Visual Studio 2015 can create both vNext (5) and ASP.NET 4.5/4.6 projects. ASP.NET 5 projects...

How to implement an additional non-wcf service contract interface in a WCF service contract interface implementation

asp.net,asp.net-mvc,wcf,wcf-data-service

Try this code private ILogin _businessLogic {get; set;} public Service() { if (_businessLogic == null) { _businessLogic = new Login(); } } I think it will solve your problem....

Visual Studio 2013 LINK : fatal error LNK1181: cannot open input file

c++,visual-studio,opencv,visual-c++,visual-studio-2013

Remove all references to the library. Somewhere that project is pointing at the path you give above and you need to remove that. Then add the library into the executable project. Right click->add->existing item, change the type to all files, then browse to the file location. ...

Adding WCF Services / Project Templates in Visual Studio Pro 2013?

c#,wcf,visual-studio-2013,sharepoint-2010

I see it in my VS 2013 using File -> New -> Website and then choosing WCF like below: ...

WCF Services In Background

c#,web-services,wcf

TLDR; Here is how I do this, I have a Program class that allows me to start my application either as Windows Service (for production) or as a Console Application (for debugging and easy testing) internal class Program { private static void Main(string[] args) { var appMgr = new ApplicationManager();...

Android AsyncTask with JSON Parsing error

java,android,json,web-services,wcf

It seems you havn't use your JSONArray object JSONArray mainfoodlist = null; tipshealth = json.getJSONArray(TAG_RESPONSE); // looping through All RESPONSE for (int i = 0; i < tipshealth.length(); i++) { JSONObject jsonobj = tipshealth.getJSONObject(i); tipHealth = jsonobj.getString(KEY_HEALTHTIPS); listhealthtips.add(tipshealth.getJSONObject(i).getString("tips")); } ...

Why do we need to publish or deploy web services or WCF?

web-services,wcf

why do we need to publish/deploy a webservices or wcf In order to make it available over internet (or) intranet (make it globally accessible). If you don't publish your service then it is not accessible by others since it can't be found/discovered. Once you publish it, then your service...

The name 'Thread' does not exist in the current context

c#,visual-studio-2013,namespaces

I assume this is a Portable Class Library or Windows Store/Phone project targeting Windows Runtime which does not have such a construct. An alternative and recommended way would be to use: await Task.Delay(TimeSpan.FromSeconds(2)); or for a blocking call in case you are not in an async context: Task.Delay(TimeSpan.FromSeconds(2)).Wait(); Similar issue...

How to use ajax to post json string to controller method?

jquery,asp.net-mvc,visual-studio-2013,asp.net-mvc-5

Your action method is expecting a string. Create a javascript object, give it the property "data" and stringify your data object to send along. Updated code: $.ajax({ type: 'post', dataType: 'json', url: 'approot\Test', data: { "json": JSON.stringify(data) }, success: function (json) { if (json) { alert('ok'); } else { alert('failed');...

using for loop for a textbox in selenium C#

c#,visual-studio-2013,selenium-webdriver

Your question is not clear. Are you trying to Enter the value in 10 different Edit Boxes in a single run or you are trying to enter different values in same Edit box in multiple runs (If so you can use random class to generate random integers which will generate...

Can I throw a message fault back to a WCF client from a routing service

c#,.net,web-services,wcf,encryption

Using Ricardo's information I was able to narrow down what I was doing. The actual answer to this is entirely up to the Endpoint configuration. It is dependent on your binding. We didn't have to change any thing in the router, but we had to change the client it looks...

Searching user tasks by task.body text

c#,visual-studio-2013,vsto,outlook-addin

Why not use the user properties (TaksItem.UserPropertiers.Add)? If the user fields is added to the folder fields, you can search for that property using Items.Find/FindNext/Restrict.

IIS Express 8 - Max allowed length

c#,asp.net,iis,visual-studio-2013,iis-express

Let's look at the code that throws: private void ValidateRequestEntityLength() { if (!this._disableMaxRequestLength && (this.Length > this._maxRequestLength)) { if (!(this._context.WorkerRequest is IIS7WorkerRequest)) { this._context.Response.CloseConnectionAfterError(); } throw new HttpException(SR.GetString("Max_request_length_exceeded"), null, 0xbbc); } } The ctor sets those options: internal HttpBufferlessInputStream(HttpContext context, bool persistEntityBody, bool disableMaxRequestLength) { this._context = context;...

RichTextbox write in place to current line

c#,text,visual-studio-2013,richtextbox

You could try something like this (rtb is your RichTextBox variable) // Get the index of the last line in the richtextbox int idx = rtb.Lines.Length - 1; // Find the first char position of that line inside the text buffer int first = rtb.GetFirstCharIndexFromLine(idx); // Get the line length...

Visual Studio C# Unit Tests

c#,unit-testing,visual-studio-2013

BankCS.BankAccount.BankAccount() is inaccessible due to its protection level If the constructor isn't public then you can't access it from outside the class. This is true of all C# code (and pretty much object oriented code in general), nothing to do with unit tests. If you want to create a...

In Visual Studio 2013, what does this black arrow-shaped symbol in the breakpoint bar mean? [duplicate]

c#,visual-studio,visual-studio-2013,ide

That icon indicates that the line is a Find Result from the last time you did a "Find In Files."

How to create a folder that contains the current date and time instead of name

winforms,visual-studio-2013,c++-cli

Don't hard-code the desktop directory name, it is not c:\users\desktop. .NET makes it easy: String^ path = System::IO::Path::Combine( Environment::GetFolderPath(System::Environment::SpecialFolder::Desktop), DateTime::Now.ToString("yyyyMMddhhmmss")); System::IO::Directory::CreateDirectory(path); // Write file(s) to <path> //... It is up to you to decide how fine-grained to make the directory name, if you do this at a very high rate...

Visual Studio 2013 closes

visual-studio,visual-studio-2013

Everything is ok with your Visual Studio. It is an expectable behaviour of your program. First, you need to understand that Visual Studio doesn't somehow affect the process of program execution after it has been compiled and run. It shouldn't "pause the program" in the end of execution itself. So,...

How can I run “query session” using vb.net?

vb.net,visual-studio-2013,cmd

It seems to be a permission problem. You need to pass a user name and a password of an administrator user to your command ..... process.StartInfo.UserName = "yourAdminUser" process.StartInfo.Password = GetPassword() ..... Public Function GetPassword() as String Dim ss = new SecureString() ss.AppendChar("p") ss.AppendChar("a") ss.AppendChar("s") ss.AppendChar("s") return ss End Function...

How can I add a .props file to a C# project?

azure,visual-studio-2013,azure-webjobs

From my understanding in this article it is enough that you add a new text och xml file and name it WebJobs.props. Look also at the screenshot explaining how you should edit it. Here is a different example of this file. https://github.com/davidebbo-test/WebAppWithWebJobsVS/commit/15e7579075312d620fe42a8746503ba82adf5305

VS2013 Error: LNK2019 When trying to build ZeroMQ server

c++,visual-studio-2013,zeromq

According to the library names on zeromq.org, you are trying to link the same library twice: first with the release version, and then with the debug versions. Remove libzmq-v120-mt-gd-4_0_4.lib from your Release configuration, and remove libzmq-v120-mt-4_0_4.lib from your Debug configuration....

Is there a way to implement a wcf service connected to a database without paying for azure?

database,wcf,azure,windows-phone-8

Here are some interesting articles about WCF Services in Windows Phone world. How to consume an OData service for Windows Phone 8 Using WCF Service in Windows Phone 8.1 (same in Windows Phone 8) Now you can host the WCF Service in your own server, hosting provider or anything else....

TF400889 Long path error received from TFS

visual-studio-2013,tfs,tfvc

Not sure if you're even using the data binding features which the .datasource file is generated for, but turning that off in your service reference configuration by manually editing the .svcmap file would solve your problem. After editing make sure you use the Update Reference feature to get rid of...