Thursday, March 8, 2012

Redirect TFS 2010 Reports


A few days ago I has to move the databases from TFS 2010and Sharepoint, It was complicated but I did it. But I get a small problem, and was that when I try to view the reports in the Sharepoint web site it was redirected to the old RS Server.

Looking in Internet I found this  Post to solve the problem, and the cause was because Sharepoint save a cache for the redirect address, so I need to clear the cache and the problem was solved.
In the post said that the way to clear the cache was use the following address in the explorer

http:////_layouts/TfsRedirect.aspx?tf:Type=ReportList&tf:ClearCache=1&tf:Test=1



Where is the address for the Sharepoint that we use, is the collection for the TFS used for our site and is the name of the project. With this, Sharepoint clear the cache and the Reports are redirected to the correct server in the Sharepoint site for our TFS Project. You need to do this for all projects created in the TFS.

Regards,

Thursday, December 29, 2011

Error trying to update record in Dynamics Ax

Strange error when trying to update a record in Dynamics Ax 2009. When trying to save a record a message like the following is showed:


Cannot edit a record in Projects (ProjTable).
An update conflict occurred due to another user process deleting the record or changing one or more fields in the record

In this case is the ProjTable but can be any table. The problem happen when the system was running an instruction like update_recordset.

The solution was run a job using an instruction while select forupdate ....
Inside the while cycle and before start to modify the record values, i wrote the next instruction:

projTable.reread();

All the instruction was something like the following:

ttsbegin;
while select forupdate projTable...
...
{
    projTable.reread();
    .....
    projTable.update();
}
ttscommit;

After run the job the problem was solved and the process with the instruction update_recordset start to work again without problems.

I hope this can help to someone in a similar problem

Wednesday, February 16, 2011

the remote server returned an unexpected response: (405) method not allowed using WCF

When you're using WCF and try to check an *.svc file, you get an exception with the next messages:

"the remote server returned an unexpected response: (405) method not allowed ".

And if you try to check the file using IE, you get a http error with the code 404.3.

To solve this problems, run the following command:

C:\Windows\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg -i

With that, the problem has gone.

Monday, October 26, 2009

Error trying to add Web Reference to SmartDevice Project in VS 2008

In a development of SmartDevice project in Visual Studio 2008, when add or update a Web Reference an error message like the following is showed:

The custom tool 'MSDiscoCodeGenerator' failed. Could not retrieve the current project.

To solve this issue, just go to the command prompt in the Visual Studio 2008 directory (Start -> Programs-> Microsoft Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt )

From the command line execute the following command:
  • devenv /resetskippkgs
With that, a new instance of VS 2008 will be started and the update or add of the Web Reference will work fine.

Monday, October 5, 2009

Error in TFS Reports. Query execution failed for data set 'dsLastProcessedTime'

When upgrade to SQL Server 2008, the SQL Server that use the TFS to show the reports present the following message:

Query execution failed for data set 'dsLastProcessedTime'.

To resolve this problem, you need to do the following:

  1. Go to the following Address http://server/Reports
  2. Select the Data Source TfsOlapReportsDS
  3. Check the option 'Enable This Data Source'
  4. In Data Source Type, select 'Microsoft SQL Server Analysis Services'
  5. In Connection String, write 'Data source=[servername]; initial catalog=TfsWarehouse' (without ')
  6. Check 'Credentials stored securely in the report server', and type the user name [domain\user] and the password for the user in the domain who has access to the server of analysis Services.
  7. Check 'Use as Windows Credentials ...' and 'Impersonate the authenticated user...' and click the botton Apply.

After that, do the same for the Data Source TfsReportDS, with the following exceptions

  1. In the Data Source Type, select Microsoft SQL Server.
  2. In the Connection String write 'Data Source=[servername]; initial catalog=TfsWarehouse'.

Use the same configuration used in the Data Source TfsOlapReportDS.

With that, the reports should be showed again.

Saturday, July 25, 2009

Error trying to open a DataBase from SQL CE in Visual Studio 2008

When trying to open or create a database of SQL CE in Visual Studio 2008 , and an error is showed like with the following message:

"An error ocurred while retrieving the information from the database"

To resolve this issue follow the next step:

1. Install the SSCEVSTools-enu.msi from the VS 2008 SP1 folder, if you have that files.

2. If you don't have that folder, install or reinstall the VS 2008 SP1.

With that, this issue is resolved.

Friday, December 19, 2008

Comunicate Ax 4.0 and .Net Application using BusinessConnector

If you try to connect an application from .NET with Axapta 4.0, you can do it using the BusinessConnector, which come with the Ax Client.

Supose you have the following method on an Ax Class called TestClass:

int SumNet(int a, int b)
{
;
return a + b;

}

To execute the method SumNet from a .NET Application you need to do the following:

1. Create a proyect on Visual Studio .NET (2005 or 2008)

2. On the proyect add reference, and on the dialog, choose browse. Locate the folder where the Ax client is installed, and in the folder Bin, select and add the reference to the Microsoft.Dynamics.BusinessConnectorNet.dll

3. Use the following code from the .NET Proyect to call the method:

//Create the Axapta object to connect with Ax
Microsoft.Dynamics.BusinessConnectorNet.Axapta ax = new Microsoft.Dynamics.BusinessConnectorNet.Axapta();

//Create the object to represent the TestClass from Ax on .NET
Microsoft.Dynamics.BusinessConnectorNet.AxaptaObject axObj;

//Logon on Axapta
ax.Logon(null, null, null, null);


//Create an instance for the class
axObj = ax.CreateAxaptaObject("TestClass");

//Create object to be the parameters used in the call to the class on Axapta.
object[] obj = new object[2];
obj[0] = 5;
obj[1] = 13;

//Call the method SumNet on Ax for the class TestClass
int nResult = (int)axObj.Call("SumNet", obj);

//Show the result
MessageBox.Show(nResult.ToString());

//Don't forget do the LogOff on Axapta
ax.Logoff();


In this example, we supose that the Ax Client is configured to the correct AOS and the user has permission to use Axapta, in other case, in the method LogOn you need to specify other parameters to make the correct logon.



That's all, it's easy.