Visual Studio settings files corrupt / MySQL connection issues - mysql

My Visual Studio 2012 Professional is having problems with a three project solution.
I have been struggling all day with a LinqToMySQL.edmx file and getting a MySQL data connection option to appear in Server Explorer.
For this I have tried installing EFTools6.1.0ForVS2012. The mysql connector I have tried is mysql-connector-net-6.7.4. This worked at one point but other problems with MySQL dll versions means I am back to square one (when I got the latest version of the DLL which I got from nuGet 6.8.3, it was still looking for 6.7.4). I have since got 6.7.4 and added the reference to the dll for all project. I've also tried editing machine.config to look for the correct mysql data provider. Still no joy.
But now...
For each solution the app.config or web.config files can't be read when trying to access Properties > Settings.
An error occurred while reading the app.config file. The file might be
corrupted or contain invalid XML
All files seem valid when checked under an XML validator.
When opening a project in VS2012 I get the error:
Microsoft Visual Studio
The ProviderPackage package did not load correctly.
The problem may have been caused by a configuration change
or by the installation of another extension. You can get more
information by examining the file
t:\Users\John\AppData\Roaming\Microsoft\VisualStudio\11.0\A
ctivityLog.xml.
When trying to create a new project I get:
Failed to create a 'ImageSource' from the text
'..\lmages\Medium.png'.
After re-installing Visual Studio the problem persists.
In the activity log the last errors are:
<entry>
<record>235</record>
<time>2014/03/25 10:28:31.202</time>
<type>Warning</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>The catalog cache file is not up-to-date and has to be regenerated:</description>
<path>C:\Users\John\AppData\Local\Microsoft\VisualStudio\11.0\ComponentModelCache\Microsoft.VisualStudio.Default.cache</path>
</entry>
<entry>
<record>236</record>
<time>2014/03/25 10:28:31.211</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Component Model Host Package]</description>
<guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
<hr>80131902</hr>
<errorinfo>Configuration system failed to initialize</errorinfo>
</entry>
<entry>
<record>237</record>
<time>2014/03/25 10:28:31.241</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Visual Studio Component Model Host Package]</description>
<guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
<hr>80131902</hr>
<errorinfo>Configuration system failed to initialize</errorinfo>
</entry>

Looks like most of these errors were caused by malformed XML in the machine.config file in the framework folder. The machine.config file in framework64 was fine which must have caused me confusion. That's what editing with notepad gets you!
Still having problems with the mysql connector but that's a separate issue.

Related

Advice needed: NewtonSoft.Json and Dynamics NAV 2009 R2 Classic

I'm trying to get the Codeunit 50000 in this zip file to work: https://kappiwebhosting.blob.core.windows.net/dynamcisis/2015/09/Json.zip
Found here: https://dynamics.is/?p=2303
C/AL Globals
I'm trying to get Dynamics Nav 2009 to recognize the NewtonSoft.Json.dll, but no matter which version i try, i get this error as soon i want to verify the DotNet variable "JsonTextReader"/"JsonTextWriter" when selecting the subtype.
.NET interop: exception occured, 'Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'.
If i declare a new Test variable of type DonNet and click [...] to select it from scratch i got this error when trying to choose which assembly to use:
.NET interop: exception occured, 'Could not load file or assembly 'C:\Program Files (x86)\Microsoft Dynamics NAV\60\Classic\Add-ins\Newtonsoft.Json.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'.
The Newtonsoft.Json.dll file is present ind the folder, and "Everyone" have full control to the folder as well as the file.
The Json.zip file contain a single Newtonsoft.Json.dll which i started out with. Same error. The i downloaded the https://github.com/JamesNK/Newtonsoft.Json/releases and tried all versions with the same result.
Why all this? Yes, the company i work for have decided to start using Shopify, and i need to write an interface for getting orders from Shopify etc.
I really cannot figure out why i can't get this to work. There are 3 other DotNet "variables" that's configured and works as intended with no errors.
So any advice is highly appreciated.
Thanx

SSMS 2014 Service provider must implement IVsDebugger interface

I'm getting the following errors when launching Microsoft SQL Server Management Studio 2014.
The 'VsDebugPresentationPackage, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' package did not load correctly.
The 'Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\Leah\AppData\Roaming\Microsoft\AppEnv\10.0\ActivityLog.xml'.
I have checked the ActivityLog.xml and have found the following errors:
<entry>
<record>1063</record>
<time>2016/09/09 10:51:43.711</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91]</description>
<guid>{04401FF3-8B0F-4D2D-85EB-2A3542867A8B}</guid>
<hr>80070057 - E_INVALIDARG</hr>
<errorinfo>Service provider must implement IVsDebugger interface</errorinfo>
</entry>
<entry>
<record>1064</record>
<time>2016/09/09 10:51:43.714</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.SqlServer.Management.SqlStudio, Microsoft.SqlServer.Management.SqlStudio, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91]</description>
<guid>{04401FF3-8B0F-4D2D-85EB-2A3542867A8B}</guid>
<hr>80070057 - E_INVALIDARG</hr>
<errorinfo>Service provider must implement IVsDebugger interface</errorinfo>
</entry>
This message has started appearing today after my PC black screened during windows updates. After several more black screens and further forced restarts, windows restored to a previous version and booted successfully. I have tried doing a fresh install of Microsoft SQL Server Management Studio 2014 but it hasn't changed the outcome.
This is the update that caused the black screens: Feature update to Windows 10, version 1607
Any help welcomed. Thanks.
Yes, it wasn't related to the update. My machine.config wasn't correct as I had put the connection string above config section in the machine.config.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

ASP.Net Could not load file or assembly MySql.Data

I have a ASP.Net website that connects to a MySQL data base to retrieve data. I have used NuGet to install mysql.data. Doing this added a Bin folder with the sql.data dll in it to my project. It added a reference in my web config file. and it added a packages.config to my project. All of this is expected i assume ? With these resources in place my website works when i run it from visual studio. The problem is when i upload it to a server i get the following error :
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Could not load file or assembly 'MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
Source Error:
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Source File: d:\DZHosts\LocalUser\bman262\www.brandonsLoginTest.somee.com\riviera horticulture\web.config Line: 7
Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1069.1
This is saying it cant find the mysql.data reference right ? What am i doing wrong ?
Here are some pictures of my solution in visual studio and my web.config
Solution
Web.config
I am tearing my hair out over this, any help would be VERY appreciated
→ You will have to make sure that the same version is installed on the server where you are deploying your project.
→ If the server to which you are deploying your project is on 64 bit, you can enable 32 bit support for this site's application pool, if your dll requires 32 bit architecture.
For anyone using similar or the same host as me if you have this problem the solution was to convert the project file to an application on the server.

Unable to cast COM object of type 'System._COMObject' to interface type

I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D4E5AF42-7999-473C-8082-6EFC676953C4}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
It has been doing this ever since I copied the package over. I have followed through online guides and run the regsvr32 dts.dll and this said it was successful but nothing has changed. I still get the error, why is this?
The SSIS package seems to validate my containers, it takes a long time to do this compared to the other two and then fails later on in the validation throwing the above error message.
You can't just copy the package, but you need additionally to change the name and generate new GUID (which identifies the COM object) for this package. Check this MSDN article for more info.
Here is the workaround: Solution Explorer -> right click project ->properties->debugging->Run64bitRuntime->set to false.
I hope it helps others. The solution worked for me:
I registered the assembly using the gacutil.exe. My SSIS project target server version was SQL 2012. So, I was using the DTSPipelineWrap.dll version 11.0. I opened the "Developer Command Prompt for VS2015" in Administrator mode, then typed the following command: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe /i "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll"
Then from my SSIS script task, References--> I removed the existing DTSPipelineWrap which was using the assembly from the location "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll". Then in the References folder, right click-->Add Reference-->Browse find the assembly from the location "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.DTSPipelineWrap\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SQLServer.DTSPipelineWrap.dll"
Click Ok. Rebuild the code and executed the package. It has worked for me.
In my case this is was a validation overload/timeout, the package contained references to hundreds of tables.
Opening the offending data flow forced re-validation and cleared the error.
Project --> Properties --> Configuration Properties --> Debugging
and then change Run64BitRuntime to False under Debug Options
In case this might help someone: I got this error due to timeout issues caused by a poorly optimised query. There was nothing inherently wrong with the SSIS package and it ran fine once i fixed the problem in the DB Source.

SSRS - Cannot Export to PDF or Tiff but other formats work fine

I have an SSRS report. The report runs fine both in BIDS and when I upload to the SSRS Server. When I click to export to PDF or Tiff in BIDS, it just says Exporting Please Wait... If I try to export to any format using the SSRS Server/Reports, it takes like 10 minutes, then comes back and says:
Server Error in '/Reports' Application.
--------------------------------------------------------------------------------
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Note: Runtime errors are enabled so this is the only error message I can get. I went into the server logs on the SSRS server and this is what I can see that has errors:
library!ReportServer_0-2!804!07/01/2014-10:08:02:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
I have tried making a new report and copying over the items and it is still giving me the same problem so I really have no idea what to try next. Please help!
I've only seen this issue on timeouts really, this might not be helpful but have you tried running & accessing the report locally from your reporting services machine and seeing if it's someform of network issue. You shouldn't need any external PDF or Tiffing services installed on the PC for this to work. It may be that it'S more difficult to render PDF/Tiff than straight text to a file.
Sorry for the delay, but I did find the problem. It seems the report was like 8.51 inches wide and didn't fit on a sheet. For whatever reason, when I got it down to 8.5 including the margins, it seems to work now. Stupid microsoft couldn't just give a reasonable error message. Anyways, thanks for all your help.