I've started with Flex recently, I've noticed that some plugin for Visual Studio exist, instead of buying a licence for another program (Flex Builder). I was wondering how I could manage to remotely connect to my database with a Flash/Flex application with the help of C#/Asp.Net. If I've correctly understood what I've read in the last few days, there is basically no way to 'query' to a database with Flex 3. So I suppose there is another way by using a webservice in C# on the database server that would respond to the Http query from Flex. Am I right or totally of the track?
I am using VS2008 and oracle 10g ODP.Net. The oracle database that I used in the connection is working and tested it using sql plus.The connection string when used in a GriDView works perfectly. Now when I created a new listview control with the same connection it gives an error.Database schema could not be retrieved for this connection. Please make sure connection settings are correct and the database is online
Object reference not set to an instance of an object at VSDataObjectSupport (478,6)
We re developing an ASP MVC application witch the View (aspx) has a Flex embed. This aspx/flex view is composed by a flex application and several modules.So, when we call the application url (http://localhost:9090/MyProject/Flex/Index),the server invoke the method the will return the ActionResult that represents this action, in this case the ~/Views/Flex/Index.aspx (with the Flex app). However when the ModuleLoader,in the Flex application, try to load a module an error occurs. The problem is that the Flex application canīt directly access the modules folder (~/Views/Flex/modules/module.swf)Are there any way to get the module through an ASP MVC action? Or the best approach is to allow the access to this folder through web.config?
I'm using Visual Studio 2008, and my database is SQL Server 2000.
I want to add a connection to the Server Explorer in VS. The Data source is Microsoft SQL Server (SqlClient). After entering in all my information and I click Test Connection, it is successful.
But when I click OK, I get the error:
Unable to add data connection. ExecuteScalar requires an open and available connection. The connection's current state is closed.
I am working on a project that is primarily ASP.NET based. The main project is meant to be deployed to multiple locations for different clients, so one client might be located at website.com/client1 and another at website.com/client2. Within the application, we regularly use the application root operator ~ to get the path to a resource.We also have a bunch of Flex applications that get deployed in there, and many rely on web services within the ASP.NET application. What I'm after is a way to reference the services relative to the application root. Here's an example of the location of some files for two client deployments:
Client A website.com/clientA/swf/FlexApplication.swf website.com/clientA/services/webService.asmx Client B website.com/clientB/swf/FlexApplication.swf website.com/clientB/services/webService.asmx
FlexApplication and webService are both exactly the same, so what I want to do is something like this in the Flex code:
var myService:CustomService = new CustomService(~/services/webService.asmx); myService.callMethod("Test");
I would like to avoid using relative paths for the usual reasons. Is there a good way to do this or a good way to pass the root url to the flex application from ASP.NET?
I would like to know how to upload a file from ActionScript 3 (From a FLEX Application) to a Dot Net Back End, maybe to an ASHX file, an ASPX file or similar and using C# as core backend language.
I created an application as part of an ASP.NET site. I would like to receive error notifications in my inbox whenever something goes wrong with that flash application.
As I do not have control over our mail server (which has a different domain name), I cannot establish a cross domain policy allowing me to send error emails to my inbox.
Instead, thought I'd send a request to an ASP.NET handler that sends an email on behalf of the flash app.
Now the problem: the error report should include a screenshot of the flash application at the time the error occurred. The FileReference class however only allows file uploads with user interaction (browse dialog) and cannot be used programmatically to send the screenshot to my ASP.NET handler. The plain old POST back only allows files up to ~200K.
Am I missing something or is there no alternative to :
using POST w/ a compressed or resized screenshot or forcing the user to first save a screenshot and then select it for upload?
I have an asp.net page where I get the user_id from who's logged in. Now I need to pass this user_id to a flex application that runs in an asp.net page as a .swf. How can I get this user_id in a variable in my flex application. Or what is the best way to get the user_id into flex.
I'm working on a batch process script that's executed from Flex. The batch script is in a .aspx Page and returns partial results through the following class:
public class ResponseLogger { private HttpResponse _response; public ResponseLogger(HttpResponse response) { this._response = response; } public void Start()
I would like to have a FLEX SWF Menu in .NET that is animated, and use button clicks to update an iFrame in an .NET 2.0 Ajax enabled application without a page update or refresh. If I use URLVaribles in Flex, The only way I've gotten to them to ASP.NET is via URL Page Navigation which always refreshes the screen. There is a LOADVARS function but I have not gotten it to work. Is there any suggestion on how one would do this??
Do I need to look into using JSON for Flex??? Or WebOrb???
This works fine... but with a page refresh (which is not cool)...
navigateToURL( new URLRequest( "http://localhost:50294/WEBAPP/Default.aspx?P=2&H=500" ), "_self" );
This does NOT work fine... (in fact it just loads the whole page .NET page in FLEX, not what I am looking for)
var variables:URLVariables = new URLVariables(); variables.P="1"; variables.H="400"; var request:URLRequest = new URLRequest(); request.url = "http://localhost:50294/Timber2/Default.aspx?"; request.method = URLRequestMethod.POST; request.data = variables; var loader:URLLoader = new URLLoader(); loader.dataFormat = URLLoaderDataFormat.TEXT; loader.addEventListener(Event.COMPLETE, uploadComplete); try { loader.load(request); } catch (error:Error) { trace("Unable to load URL"); }
I really enjoy the flex states framework. You define a few states for your control, and then can set child controls to only appear in certain states. Check out this code:
I have Flex application requiring to filter users depending on there database groups. Depending on which group they are, the're is a config.xml file that is use to populate the swf.
Here is how I figure how to do this : 1. The client comes to a .aspx page with a form requiring a username and a password. 2. On the server side I confirm the user credential 3. Once the username/password is valid I redirect to the mxml file with the config.xml file in the html headers (post).
My problem comes when I need to get the post data from the http request. Let's say I have this code :
<mx:Application initialize="init()">
<mx:Script> <![CDATA[ [code]... How do I get the post data on the init() function.
I have a website that's developed in ASP.NET and uses the AJAX Toolkit (asp:ToolkitScriptManager) for a couple of extenders. The AJAX effects (e.g. ) work perfectly across IE 7, IE8, FF3.5, Safari, and Chrome. However, I embedded my site in a desktop Flex-AdobeAir application using the component which is able to run the entire site including javascript except where the AJAX is used.
I narrowed the source of the problem down to the difference between using asp:ToolkitScriptManager and asp:ScriptManager. Here's an example page that will display "Safari" in the embedded flex browser as the result of document.write(Sys.Browser.name):
<%@ Page Language="C#" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[code]...
var params:Object = {}; //params["stack"] = e.stackTrace.slice(0, 542); //length 542 = works //params["stack2"] = e.stackTrace.slice(1, 543); //length 542 = works (just to show that it's not about the content itself) params["stack3"] = e.stackTrace.slice(0, 543); //length 543 = fails
I also seem to be able to create many form fields (with 542 length) so that it's not a limit of the request itself but of the form field:
web.config file. when i go to test connection, i get this errorCould not establish a connection to the database.f you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the providerCan someone help me pls i am trying to deploy it to the remote server. Here is the codes:
need a simple video that can expalin me the simple connection between a web form and sql db i am a begineer, i am learning all the things from these website, i need a video tutoorial that will explain me that how to create a simple form and simple database and conect them and manage those datas, can you people understand what i am expecting, for example, just a user login page with user name and password , and we have to store that details with a data base, and how to see the details what we stored, thats it and how to edit those details, atleast i need the first set of connection and manupulating video.
i have create users and rolls and all thing work very good on my computer but after upload view exception
Code:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) how can i change connection string for mdf database
I did all the instructions which are in the following link: [URL] in order to do a connection between MySQL database and ASP.NET but I did not successed. Sometimes, it told me that I have a mistake in the <asp: button> and sometimes it told me that I did a mistake in calling (addImage) method. And this is my whole code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HW5._Default" %> <script> public class DataAccess { private string _strConn = @"Driver= {MySQLODBC 3.51 Driver};SERVER=localhost;DATABASE=test1;"; private OdbcConnection _objConn; public DataAccess() { this._objConn = new OdbcConnection(this._strConn); } // This function adds the Images to database public string addImage(timestamp id, byte [] data,string extension) { string strSql = "SELECT * FROM File"; DataSet ds = new DataSet("Image"); OdbcDataAdapter tempAP = new OdbcDataAdapter(strSql,this._objConn); OdbcCommandBuilder objCommand = new OdbcCommandBuilder(tempAP); tempAP.Fill(ds,"Table"); try { this._objConn.Open(); DataRow objNewRow = ds.Tables["Table"].NewRow(); objNewRow["Extension"] = extension; objNewRow["Data"] = buffer; objNewRow["ID"] = id; ds.Tables["Table"].Rows.Add(objNewRow); // trying to update the table to add the image tempAP.Update(ds,"Table"); }.....................................
I have run aspnet_regsql.exe beaucoup times and it creates the database aspnetdb.db. I have created it in my primary database connection and in the SQLExpress connection.
Then I open Visual Studio 2008 and run the ASP.net Web Site Configuration Tool. I click on Provider tab and select Select a single provider for all site management data. The provider shown is AspNetSqlProvider. A book that I'm reading says it should be aspnetdb.
When I click on the test link, I get the following message
Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.
In my book, it looks like the aspnetdb database should appear in the app_Data folder of my web site. What is supposed to put it there? Does it get moved from the SQL Server Data folder?
I use the class below in my code-behind to connect to my database. How would I (overload?) this class to choose between multiple connection strings (databases)?
Or should I have a separate class for each connection?