Arduino Yun call function on server issue

Hello all, i just purchased a Yun a couple of days ago and I am trying to send a value to my .net application using wifi. When i upload the sketch nothing happens.

I have a function there that will enter a value to my database when called and return a json reply. Can someone take a look and provide some assistance. Thanks in advance.

/*
Running process using Process class.

This sketch demonstrate how to run linux processes
using an Arduino Yún.

created 5 Jun 2013
by Cristian Maglie

This example code is in the public domain.

*/

#include <Process.h>

void setup() {
// Initialize Bridge
Bridge.begin();

// Initialize Serial
Serial.begin(9600);

// Wait until a Serial Monitor is connected.
while (!Serial);

// run various example processes
runCurl();
runCpuInfo();
}

void loop() {
// Do nothing here.
}

// The path to the server function is: http://subDomain.domain.com/cleanProcust_/arduinotest/2

void runCurl() {
// Launch "curl" command and get Arduino ascii art logo from the network
// curl is command line program for transferring data using different internet protocols
Process p; // Create a process and call it "p"
p.begin("curl"); // Process that launch the "curl" command

p.addParameter("http://subDomain.domain.com/cleanProcust_/arduinotest/"); // Add the URL parameter to "curl"

p.run(); // Run the process and wait for its termination

// Print arduino logo over the Serial
// A process output can be read with the stream methods
while (p.available() > 0) {
char c = p.read();
Serial.print(c);
}
// Ensure the last bit of data is sent.
Serial.flush();
}

Here is my app function:

Function arduinoTest() As JsonResult
Dim cleanproServicesJob As New cleanproServicesJob
' Dim routeCheck = db.cleanProRoutes.Single(Function(p) p.rowUUID = Id)

cleanproServicesJob.rowUUID = Guid.NewGuid
cleanproServicesJob.Service = "Arduino 4567"
' cleanproServicesJob.Category =
db.cleanproServicesJobs.AddObject(cleanproServicesJob)

db.SaveChanges()
Dim result = New With {.success = "True"}
Return Json(result, JsonRequestBehavior.AllowGet)
End Function

I found the problem, i moved the "runCurl" function on the next line after "Bridge.begin();" and it works.

its probably because you didnt open the serial monitor

while (!Serial);

waits until you do