I'm trying to develop a simple webform application to create/edit invoice from a .aspx page and want to sync QB Desktop & MS SQL database using web connector & .ASMX web service (2 way sync: QBD -> web app & web app > QBD).
Here is a what I did:
I've setup QB Desktop US version 19 (latest) and Web connector
Added an application via adding .QWC file (I'm using this default .qwc file without any changes, not sure even how can I make it!!)
Step 1 & 2, are done but looking for proper solution to start with the development part. I've referred some other StackOverflow questions and found this sample but not sure which project and version I've to choose from both of them. I'm finding some good sample applications which connects to QB Desktop & Web applications using Interop.QBFC13
I really don't have idea how web connector works and sync with my web app.
Thanks!
I'm using this default .qwc file without any changes, not sure even how can I make it!!
This ^^^ will not work. Ever. There is no "default" .QWC file -- it is specific to your application and if you're using someone else's it's guaranteed not to work.
Create your own .QWC file. Example template:
<?xml version="1.0"?>
<QBWCXML>
<AppName>QuickBooks Integrator</AppName>
<AppID></AppID>
<AppURL>https://example.com/quickbooks/server.php</AppURL>
<AppDescription></AppDescription>
<AppSupport>https://example.com/quickbooks/support.php</AppSupport>
<UserName>username</UserName>
<OwnerID>{90A44FB7-33D9-4815-AC85-AC86A7E7D1EB}</OwnerID>
<FileID>{57F3B9B6-86F1-4FCC-B1FF-967DE1813D20}</FileID>
<QBType>QBFS</QBType>
<Scheduler>
<RunEveryNMinutes>2</RunEveryNMinutes>
</Scheduler>
<IsReadOnly>false</IsReadOnly>
</QBWCXML>
Fields:
<AppName> This is displayed to the user in the Web Connector GUI
<AppID></AppID> Leave it blank
<AppSupport>...</AppSupport> Must contain a valid URL to a valid page which returns a 200 OK HTTP response when visited. Users who have technical problems will be directed here.
<AppURL>...</AppURL> Must contain a valid URL to your SOAP server, https://... if it's remote, http://localhost/... if it's local.
<UserName>...</UserName> This will match the username your SOAP server understands for authentication
<FileID>...</FileID> You can make this up as long as it follows the GUID format (uppercase HEX chars only!): {6904A826-7368-11DC-8317-F7AD55D89593}. It has something to do with DataExt elements; most simple integrations can just make this up.
<OwnerID>...</OwnerID> Same as above
<QBType>...</QBType> Specifies the type of Quickbooks you want to connect to with the web connector (ie “QBFS” or “QBPOS”)
<Scheduler>...</Scheduler> This is an optional element, use this to schedule the Web Connector to run every so often automatically
<IsReadOnly>...</IsReadOnly> Leave this set to false, setting it to true will not work.
Did you read the 100+ page PDF that documents exactly how the Web Connector works and what you need to implement? Link:
QuickBooks Web Connector Programmer's Guide PDF
What have you tried to implement so far?
Related
I added Application Insights to my web project using Application Insights button in Visual Studio 2017. After that I've added JavaScript code to View\Shared\_Layout.cshtml as described here
After a week of monitoring I found that there is missing some information about client browser, OS, etc.
The following query returns only client_Type with PC value (but should also Mobile)
requests
| project client_Type, client_Browser, client_Model, client_OS
Why it is empty? What I missed? Should I add some configuration to store that info?
requests might not have browser info. that comes from the server side, so i want to say it gets everything from the UserAgent header of inbound requests.
however, the javascript code in your layout.cshtml enables PageView telemetry, which collects more information from the browser.
things to do:
1) make sure your backend (whatever is sending requests) is using the same ikey as whatever you have in your javascript snippet, to make sure you looking at the same data for both things
2) look at what's in both tables and see if it is different:
union requests, pageViews
| where timestamp > ago(14d)
| summarize count() by itemType, client_Browser
| render barchart
i bet you get a bar chart that has requests with one giant bar for one browser (empty), and a different bar for pageViews that has lots of browsers?
Hi I hope someone can help me out here.
I have a Web Application (asp.net) on my local machine, I am trying to upload video to YouTube using this sample https://developers.google.com/youtube/v3/code_samples/dotnet#upload_a_video
I have set up client id and secret for Web application in Google console when I try to upload video a browser tab opens to select one of my google accounts and once I sig in I get redirect_uri_mismatch the response details on that page are below:
cookie_policy_enforce=false
scope=https://www.googleapis.com/auth/youtube.upload
response_type=code
access_type=offline
redirect_uri=http://localhost:55556/authorize/
pageId=[some page id removed here for security reasons]
display=page
client_id=[some unique id removed here for security reasons].apps.googleusercontent.com
one interesting thing is that the redirect_uri=http://localhost:55556/authorize/ is completely different from the one set up in Google console and the one in client_secrets.json also each time I get the error page the port number changes.
redurect urls and origins are set as follows in Google console I think I have added all combinations just in case:
Authorized redirect URI
http://localhost/
https://localhost/
http://localhost:50169/AddContent.aspx
https://localhost:50169/AddContent.aspx
http://localhost:50169
Authorized JavaScript origins
http://localhost/
https://localhost/
http://localhost:50169/
https://localhost:50169/
I am not sure why redirect-uri on the error page does not match any of the
Authorized redirect URI I have specified in Google console ? any ideas ?
Also is it possible that everything is set-up correctly in Google console and my code but this error is triggered by something else like maybe I missed some setting on my you tube account ? I did not make any setting changes since I don't think I have to is that correct ?
Ok I belive that direct video upload to the website owner account is no longer supported in YT API v3.0 according to those posts.
Can YouTube Direct Upload to a Common Account for All Users?
How can I get the youtube webcam widget to upload to one account using API?
Shame, I think I will need to host the videos that users upload on my servers.
However the original issue was fixed by adding this URI to the redirect URIs in the developer console
http://localhost/authorize/
Google OAuth 2 authorization - Error: redirect_uri_mismatch
I got it to work by setting the Redirect URIs to exactly this:
http://localhost:50517/signin-google
Note:
- it does not work with a trailing slash
- port number is whatever your visual studio is assigning
- I set JavaScript Origins to:
http://localhost:50517/
With you, though, would be nice if someone actually documented this somewhere...
You should look into your code where you create the authorization URI. You need pass one of the redirect URIs you registered with Google developer console. I guess you're using some OAuth2 library which uses the localhost:port/authorize as the default redirect URI. The port changes because each time you start your local server, it picks a different port number. To fix it, you should specify a port number when starting it, for example, 8080. Then you should register localhost:8080/AddContent.aspx in Google developer console and pass it to whichever library you use to create the authorization URI.
I experienced a similar problem when trying to setup the quickstart app for the Drive REST API. I kept getting the redirect_uri_mismatch error and the port number with that error kept changing. The fix for me was to change the redirect URI in the Google Developers Console for my app to not include the port number.
There is a really easy way to get round this and I kicked myself when it dawned on me.
I am using "Web Application" credentials - you'll want the credentials manager open btw.
Run the DotNet sample app and let the browser open (I get the "Select An Account" page) - then look in the URL for the redirect URI that's been automatically generated by Google's code something like:
redirect_uri%3Dhttp://localhost:62041/authorize/
Then just go to the credentials manager and add this URL to the allowed list and save. Now select your google account and see what happens - it takes a few minutes for the API to update - if you get the redirect error page just hit back and select you account again - eventually it works and returns back to visual studio.
Once the account has been authorised once it sticks (clear the bin directory to unstick it) but this means you can now put a break point in the code and look at the credentials variable to get the refresh token everyone is so desperately trying to get so that you can persist account connections.
I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision.
Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path.
SautinSoft.PdfVision v = new SautinSoft.PdfVision();
v.ConvertHtmlFileToPDFFile(url, pdfFilePath);
Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7.5.7600.16385) was redirecting systematically my request.
In my development environment (Visual Studio Express 2012 for web, version 11.0.50727.1 RTMREL), I do not have this problem at all. Visual studio uses its own local web server whose configuration is the one by default and it works like a charm.
I added some log in the Page_Load event of the page I want to convert and for sure in my prod environment, this event is never triggered since I don't get any logs meaning the page never gets loaded. In my dev environment, my log does confirm that the pages is being loaded.
I have read a lot about this "Navigation webpage canceled" problem but all the answers I could find were about client side configuration, trust level in IE. I am using Chrome and its settings are the same whether I am debugging or hitting the prod server.
So my intuition really tells me something is going wrong on the server side.
So does anyone of you know about some IIS configuration that could fix my problem?
Thanks for your help.
I also faced similar kind of issues when using sautinsoft PDFVision
Solution:
in iis select your websites---> go to ssl settings --> client certificate --> ignore
this works for me
other chances if above not work:
goto application pool --> advanced settings---> loaduserprofile=true
I have developped a custom WCF Web Service within a SharePoint 2010 Visual Studio empty project.
My web service is working well. The problem is related to the size of the request I can send to this web service. I have realized that is something around 300Kb. If I go bigger than that, the service/client is sending me an exception.
I've looked around on the web and see that the MaxReceivedMessageSize setting may be my solution. I've tried using a FeatureActivated method to set this information using this kind of request:
// increase maximum size of requests to this web service: http://msdn.microsoft.com/en-us/library/ff599489.aspx
SPWebService contentService = SPWebService.ContentService;
contentService.ClientRequestServiceSettings.MaxReceivedMessageSize = -1;
SPWcfServiceSettings csomWcfSettings = new SPWcfServiceSettings();
csomWcfSettings.MaxReceivedMessageSize = 10485760; // 10MB
contentService.WcfServiceSettings["PT-SP-P2S-DocumentCreator.svc"] = csomWcfSettings;
contentService.Update(); // access denied thrown here!
With that code, I have an Access denied (I'm actually the Site Collection Administrator).
I also know that this parameter may be set in the app.config of web service host but, in SharePoint, where to I need to change this parameter.
I think you should make this change in the web.config file of the Web Application in which the feature is activated. SharePoint provides APIs to make web.config changes. In fact, using APIs to make changes to your web.config is preferred option because SharePoint uses Timer Job and makes same updates to all Web Front End servers in your environment. There are 2 ways to make changes to web.config as described here:
http://msdn.microsoft.com/en-us/library/ms460914.aspx
In your case, since you want to make the change only when your feature is activated, you would take the API approach as documented here: http://msdn.microsoft.com/en-us/library/bb861909.aspx
I havent worked with that Salesforce API before, so I am a bit stuck on how to connect to the salesforce service.
So far I understood that I have to generate a wsdl file for my account or rather the account of my customer (step 1). So far, so good.
But now the Quickstart (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_quickstart_steps.htm) says something about "Import the WSDL File into your development platform" (step 2).
How do I import a wsdl file into Visual Studio 2008? I cant find the "Add Web Reference" option which is mentioned in the quickstart.
And if I only need to use the WSDL, what use has the Salesforce Dotnet API package which can be downloaded from the salesforce website
(http://wiki.developerforce.com/index.php/Salesforce_Dotnet_API)?
Are there any gotchas I should watch out for when developing applications that use the salesforce API?
If you follow the directions in Binz' answer, you should be able to add a web service reference using Visual Studio.
The "Salesforce Dotnet API package" on the wiki site is not required to access the SalesForce API, it's just a library that tries to abstract it.
As far as gotchas and other things to know, I would recommend that you read chapter 6 of the Force.com Cookbook. You have to sign up for a force.com developer account (free). Most of the things you'll need to be aware of are covered in this chapter. Here are a few of them:
logging in / logging out - session
management
query / queryMore pattern (needed if
you're going to pull large sets of
data from SalesForce)
how to construct a wrapper class -
there is some sample vb.net code you
can download as well
One other thing to note, if you're going to use SOQL to query your SalesForce data, and you need to filter on a SalesForce date field, you'll need to format the date string. Here's one way to do it:
public static string FormatDateForQuery(DateTime dateToFormat, bool includeTime)
{
if (includeTime)
{
return dateToFormat.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss+00:00");
}
else
{
return dateToFormat.ToUniversalTime().ToString("yyyy-MM-dd");
}
}
For Visual Studio 2008 you need to select 'Add Service Reference', then click the 'Advanced' button on the bottom left of the dialogue. There should then be a button on the bottom of that dialogue that says 'Add Web Reference'. You should be able to then select your wsdl file and a service client proxy will be auto genned for you by VS.
To create the WSDL file, go to (your name, top right), set up, develop > api > generate enterprise wsdl > generate. In Chrome, click save page as and put that file in the c drive. In Visual Studio, go to add service reference > advanced > add web reference. Point to the file you downloaded: file:///c:/wsdl.jsp.xml
There is a parsing issue when using .NET 2.0 with date time fields in salesforce, accessing through web services.
It seems to be a bug in .NET but there's another way to address it by manually editing the wsdl.
More information here:
http://community.salesforce.com/t5/NET-Development/Can-t-update-date-datetime-from-c-webservice-through-enterprise/m-p/96046