Got this odd error and but not so meaningful.
Solution
Just include the Linq namespace that will fix the error.
using System.Linq;
Sharing knowledge does not lessen your store, often it gets you more.
Success doesn't happen overnight and patience is key to living your dream life.
Success is a journey not a destination
Thursday, May 26, 2011
Sunday, May 22, 2011
The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as ‘Allowed’ or ‘Required’
If you get this error when you try to run a WCF Rest Service, then add the following line above the class declaration
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Class1 : IService1
{
}
This is because ASP.NET Compatibility Mode implies request processing semantics that are fundamentally different from the WCF default, individual service implementations have the ability to control whether they run inside of an application for which ASP.NET Compatibility Mode has been enabled. Services can use the AspNetCompatibilityRequirementsAttribute to indicate whether they support ASP.NET Compatibility Mode
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Class1 : IService1
{
}
This is because ASP.NET Compatibility Mode implies request processing semantics that are fundamentally different from the WCF default, individual service implementations have the ability to control whether they run inside of an application for which ASP.NET Compatibility Mode has been enabled. Services can use the AspNetCompatibilityRequirementsAttribute to indicate whether they support ASP.NET Compatibility Mode
Tuesday, February 22, 2011
ODBC error 208 (42S02) Invalid object name
Issue
You may get this error even though the table is available in the database.
Solution
Using qualified table name "database.owner.table" will fix this issue.
You may get this error even though the table is available in the database.
Solution
Using qualified table name "database.owner.table" will fix this issue.
Friday, February 11, 2011
How to create XSD file path as expression for XML Source in SSIS
In your CONTROL FLOW tab, select the data flow step that contains the XML Source step. Do not go into the dataflow, it must be done in control flow.
1. Bring up its properties (right-click > Properties)
2. Click the elipsis button next to EXPRESSIONS
3. Select the [XML Source].[XMLSchemaDefinition] property then hit the elipsis button to the right of the Expression textbox to set the XSD File path
4. Drag and Drop your variable that holds your XSD path into the expression box, you should be able to evaluate expression here.
5. Click OK
6. Click OK again
7. Done
1. Bring up its properties (right-click > Properties)
2. Click the elipsis button next to EXPRESSIONS
3. Select the [XML Source].[XMLSchemaDefinition] property then hit the elipsis button to the right of the Expression textbox to set the XSD File path
4. Drag and Drop your variable that holds your XSD path into the expression box, you should be able to evaluate expression here.
5. Click OK
6. Click OK again
7. Done
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified
Check the following and fix the issue accordingly.
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \\ to \. If you are not sure about your application, please try both Server\Instance and Server\\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.
6) Also check whether TCP/IP is enabled and the port is added to the firewall exception (if it is not using the default 1433 port)
You can download PortQry from http://support.microsoft.com/kb/832919, run "portqry.exe -n yourservername -p UDP -e 1434". If this command returns information and it contains your target instance, then you can rule out possiblity 4) and 5) above, meaning you do have a SQL Browser running and your firewall does not block SQL Browser UDP packet. In this case, you can check other issue, e.g. wrong connection string.
1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \\ to \. If you are not sure about your application, please try both Server\Instance and Server\\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.
6) Also check whether TCP/IP is enabled and the port is added to the firewall exception (if it is not using the default 1433 port)
You can download PortQry from http://support.microsoft.com/kb/832919, run "portqry.exe -n yourservername -p UDP -e 1434". If this command returns information and it contains your target instance, then you can rule out possiblity 4) and 5) above, meaning you do have a SQL Browser running and your firewall does not block SQL Browser UDP packet. In this case, you can check other issue, e.g. wrong connection string.